Test Failure: Transforms/StraightLineStrengthReduce/slsr-mul.ll

Test source: git

Log:

Source: <stdin>
-- 1. ModuleToFunctionPassAdaptor
-- 1. PassManager<Function> : Skipping NOP
-- 2. StraightLineStrengthReducePass

----------------------------------------
declare void @foo(i32)

define void @slsr1(i32 %b, i32 %s) {
#0:
  %mul0 = mul i32 %b, %s
  call void @foo(i32 %mul0)
  %b1 = add i32 %b, 1
  %mul1 = mul i32 %b1, %s
  call void @foo(i32 %mul1)
  %b2 = add i32 %b, 2
  %mul2 = mul i32 %b2, %s
  call void @foo(i32 %mul2)
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 3. StraightLineStrengthReducePass

----------------------------------------
declare void @foo(i32)

define void @slsr1(i32 %b, i32 %s) {
#0:
  %mul0 = mul i32 %b, %s
  call void @foo(i32 %mul0)
  %b1 = add i32 %b, 1
  %mul1 = mul i32 %b1, %s
  call void @foo(i32 %mul1)
  %b2 = add i32 %b, 2
  %mul2 = mul i32 %b2, %s
  call void @foo(i32 %mul2)
  ret void
}
=>
declare void @foo(i32)

define void @slsr1(i32 %b, i32 %s) {
#0:
  %mul0 = mul i32 %b, %s
  call void @foo(i32 %mul0)
  %mul1 = add i32 %mul0, %s
  call void @foo(i32 %mul1)
  %mul2 = add i32 %mul1, %s
  call void @foo(i32 %mul2)
  ret void
}
Transformation doesn't verify! (not unsound)
ERROR: Timeout

Pass: StraightLineStrengthReducePass
Command line: '/home/nlopes/llvm/build/bin/opt' '-load=/home/nlopes/alive2/build/tv/tv.so' '-load-pass-plugin=/home/nlopes/alive2/build/tv/tv.so' '-tv-exit-on-error' '-passes=slsr,gvn' '-S' '-tv-smt-to=20000' '-tv-report-dir=/home/nlopes/alive2/build/logs' '-tv-smt-stats'

-- 4. GVNPass

----------------------------------------
declare void @foo(i32)

define void @slsr1(i32 %b, i32 %s) {
#0:
  %mul0 = mul i32 %b, %s
  call void @foo(i32 %mul0)
  %mul1 = add i32 %mul0, %s
  call void @foo(i32 %mul1)
  %mul2 = add i32 %mul1, %s
  call void @foo(i32 %mul2)
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 5. GVNPass

----------------------------------------
declare void @foo(i32)

define void @slsr1(i32 %b, i32 %s) {
#0:
  %mul0 = mul i32 %b, %s
  call void @foo(i32 %mul0)
  %mul1 = add i32 %mul0, %s
  call void @foo(i32 %mul1)
  %mul2 = add i32 %mul1, %s
  call void @foo(i32 %mul2)
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 6. PassManager<Function> : Skipping NOP
-- 7. PassManager<Function> : Skipping NOP
-- 8. StraightLineStrengthReducePass

----------------------------------------
declare void @foo(i32)

define void @non_canonicalized(i32 %b, i32 %s) {
#0:
  %mul0 = mul i32 %b, %s
  call void @foo(i32 %mul0)
  %b1 = add i32 1, %b
  %mul1 = mul i32 %b1, %s
  call void @foo(i32 %mul1)
  %b2 = add i32 2, %b
  %mul2 = mul i32 %b2, %s
  call void @foo(i32 %mul2)
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 9. StraightLineStrengthReducePass

----------------------------------------
declare void @foo(i32)

define void @non_canonicalized(i32 %b, i32 %s) {
#0:
  %mul0 = mul i32 %b, %s
  call void @foo(i32 %mul0)
  %b1 = add i32 1, %b
  %mul1 = mul i32 %b1, %s
  call void @foo(i32 %mul1)
  %b2 = add i32 2, %b
  %mul2 = mul i32 %b2, %s
  call void @foo(i32 %mul2)
  ret void
}
=>
declare void @foo(i32)

define void @non_canonicalized(i32 %b, i32 %s) {
#0:
  %mul0 = mul i32 %b, %s
  call void @foo(i32 %mul0)
  %mul1 = add i32 %mul0, %s
  call void @foo(i32 %mul1)
  %mul2 = add i32 %mul1, %s
  call void @foo(i32 %mul2)
  ret void
}
Transformation doesn't verify! (not unsound)
ERROR: Timeout

Pass: StraightLineStrengthReducePass
Command line: '/home/nlopes/llvm/build/bin/opt' '-load=/home/nlopes/alive2/build/tv/tv.so' '-load-pass-plugin=/home/nlopes/alive2/build/tv/tv.so' '-tv-exit-on-error' '-passes=slsr,gvn' '-S' '-tv-smt-to=20000' '-tv-report-dir=/home/nlopes/alive2/build/logs' '-tv-smt-stats'

-- 10. GVNPass

----------------------------------------
declare void @foo(i32)

define void @non_canonicalized(i32 %b, i32 %s) {
#0:
  %mul0 = mul i32 %b, %s
  call void @foo(i32 %mul0)
  %mul1 = add i32 %mul0, %s
  call void @foo(i32 %mul1)
  %mul2 = add i32 %mul1, %s
  call void @foo(i32 %mul2)
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 11. GVNPass

----------------------------------------
declare void @foo(i32)

define void @non_canonicalized(i32 %b, i32 %s) {
#0:
  %mul0 = mul i32 %b, %s
  call void @foo(i32 %mul0)
  %mul1 = add i32 %mul0, %s
  call void @foo(i32 %mul1)
  %mul2 = add i32 %mul1, %s
  call void @foo(i32 %mul2)
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 12. PassManager<Function> : Skipping NOP
-- 13. PassManager<Function> : Skipping NOP
-- 14. StraightLineStrengthReducePass

----------------------------------------
declare void @foo(i32)

define void @or(i32 %a, i32 %s) {
#0:
  %b = shl i32 %a, 1
  %mul0 = mul i32 %b, %s
  call void @foo(i32 %mul0)
  %b1 = or i32 %b, 1
  %mul1 = mul i32 %b1, %s
  call void @foo(i32 %mul1)
  %b2 = or i32 %b, 2
  %mul2 = mul i32 %b2, %s
  call void @foo(i32 %mul2)
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 15. StraightLineStrengthReducePass

----------------------------------------
declare void @foo(i32)

define void @or(i32 %a, i32 %s) {
#0:
  %b = shl i32 %a, 1
  %mul0 = mul i32 %b, %s
  call void @foo(i32 %mul0)
  %b1 = or i32 %b, 1
  %mul1 = mul i32 %b1, %s
  call void @foo(i32 %mul1)
  %b2 = or i32 %b, 2
  %mul2 = mul i32 %b2, %s
  call void @foo(i32 %mul2)
  ret void
}
=>
declare void @foo(i32)

define void @or(i32 %a, i32 %s) {
#0:
  %b = shl i32 %a, 1
  %mul0 = mul i32 %b, %s
  call void @foo(i32 %mul0)
  %mul1 = add i32 %mul0, %s
  call void @foo(i32 %mul1)
  %b2 = or i32 %b, 2
  %mul2 = mul i32 %b2, %s
  call void @foo(i32 %mul2)
  ret void
}
Transformation doesn't verify! (not unsound)
ERROR: Timeout

Pass: StraightLineStrengthReducePass
Command line: '/home/nlopes/llvm/build/bin/opt' '-load=/home/nlopes/alive2/build/tv/tv.so' '-load-pass-plugin=/home/nlopes/alive2/build/tv/tv.so' '-tv-exit-on-error' '-passes=slsr,gvn' '-S' '-tv-smt-to=20000' '-tv-report-dir=/home/nlopes/alive2/build/logs' '-tv-smt-stats'

-- 16. GVNPass

----------------------------------------
declare void @foo(i32)

define void @or(i32 %a, i32 %s) {
#0:
  %b = shl i32 %a, 1
  %mul0 = mul i32 %b, %s
  call void @foo(i32 %mul0)
  %mul1 = add i32 %mul0, %s
  call void @foo(i32 %mul1)
  %b2 = or i32 %b, 2
  %mul2 = mul i32 %b2, %s
  call void @foo(i32 %mul2)
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 17. GVNPass

----------------------------------------
declare void @foo(i32)

define void @or(i32 %a, i32 %s) {
#0:
  %b = shl i32 %a, 1
  %mul0 = mul i32 %b, %s
  call void @foo(i32 %mul0)
  %mul1 = add i32 %mul0, %s
  call void @foo(i32 %mul1)
  %b2 = or i32 %b, 2
  %mul2 = mul i32 %b2, %s
  call void @foo(i32 %mul2)
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 18. PassManager<Function> : Skipping NOP
-- 19. PassManager<Function> : Skipping NOP
-- 20. StraightLineStrengthReducePass

----------------------------------------
declare void @foo(i32)

define void @slsr2(i32 %a, i32 %b) {
#0:
  %a1 = add i32 %a, 1
  %b1 = add i32 %b, 1
  %mul0 = mul i32 %a, %b
  %mul1 = mul i32 %a1, %b
  %mul2 = mul i32 %a, %b1
  %mul3 = mul i32 %a1, %b1
  call void @foo(i32 %mul0)
  call void @foo(i32 %mul1)
  call void @foo(i32 %mul2)
  call void @foo(i32 %mul3)
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 21. StraightLineStrengthReducePass

----------------------------------------
declare void @foo(i32)

define void @slsr2(i32 %a, i32 %b) {
#0:
  %a1 = add i32 %a, 1
  %b1 = add i32 %b, 1
  %mul0 = mul i32 %a, %b
  %mul1 = mul i32 %a1, %b
  %mul2 = mul i32 %a, %b1
  %mul3 = mul i32 %a1, %b1
  call void @foo(i32 %mul0)
  call void @foo(i32 %mul1)
  call void @foo(i32 %mul2)
  call void @foo(i32 %mul3)
  ret void
}
=>
declare void @foo(i32)

define void @slsr2(i32 %a, i32 %b) {
#0:
  %a1 = add i32 %a, 1
  %mul0 = mul i32 %a, %b
  %mul1 = add i32 %mul0, %b
  %mul2 = add i32 %mul0, %a
  %mul3 = add i32 %mul1, %a1
  call void @foo(i32 %mul0)
  call void @foo(i32 %mul1)
  call void @foo(i32 %mul2)
  call void @foo(i32 %mul3)
  ret void
}
Transformation doesn't verify! (not unsound)
ERROR: Timeout

Pass: StraightLineStrengthReducePass
Command line: '/home/nlopes/llvm/build/bin/opt' '-load=/home/nlopes/alive2/build/tv/tv.so' '-load-pass-plugin=/home/nlopes/alive2/build/tv/tv.so' '-tv-exit-on-error' '-passes=slsr,gvn' '-S' '-tv-smt-to=20000' '-tv-report-dir=/home/nlopes/alive2/build/logs' '-tv-smt-stats'

-- 22. GVNPass

----------------------------------------
declare void @foo(i32)

define void @slsr2(i32 %a, i32 %b) {
#0:
  %a1 = add i32 %a, 1
  %mul0 = mul i32 %a, %b
  %mul1 = add i32 %mul0, %b
  %mul2 = add i32 %mul0, %a
  %mul3 = add i32 %mul1, %a1
  call void @foo(i32 %mul0)
  call void @foo(i32 %mul1)
  call void @foo(i32 %mul2)
  call void @foo(i32 %mul3)
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 23. GVNPass

----------------------------------------
declare void @foo(i32)

define void @slsr2(i32 %a, i32 %b) {
#0:
  %a1 = add i32 %a, 1
  %mul0 = mul i32 %a, %b
  %mul1 = add i32 %mul0, %b
  %mul2 = add i32 %mul0, %a
  %mul3 = add i32 %mul1, %a1
  call void @foo(i32 %mul0)
  call void @foo(i32 %mul1)
  call void @foo(i32 %mul2)
  call void @foo(i32 %mul3)
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 24. PassManager<Function> : Skipping NOP
-- 25. PassManager<Function> : Skipping NOP
-- 26. StraightLineStrengthReducePass

----------------------------------------
declare void @foo(i32)

define void @slsr3(i32 %b, i32 %s) {
#0:
  %mul0 = mul i32 %b, %s
  call void @foo(i32 %mul0)
  %b1 = add i32 %b, 2
  %mul1 = mul i32 %b1, %s
  call void @foo(i32 %mul1)
  %b2 = add i32 %b, 4
  %mul2 = mul i32 %b2, %s
  call void @foo(i32 %mul2)
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 27. StraightLineStrengthReducePass

----------------------------------------
declare void @foo(i32)

define void @slsr3(i32 %b, i32 %s) {
#0:
  %mul0 = mul i32 %b, %s
  call void @foo(i32 %mul0)
  %b1 = add i32 %b, 2
  %mul1 = mul i32 %b1, %s
  call void @foo(i32 %mul1)
  %b2 = add i32 %b, 4
  %mul2 = mul i32 %b2, %s
  call void @foo(i32 %mul2)
  ret void
}
=>
declare void @foo(i32)

define void @slsr3(i32 %b, i32 %s) {
#0:
  %mul0 = mul i32 %b, %s
  call void @foo(i32 %mul0)
  %#1 = shl i32 %s, 1
  %mul1 = add i32 %mul0, %#1
  call void @foo(i32 %mul1)
  %#2 = shl i32 %s, 1
  %mul2 = add i32 %mul1, %#2
  call void @foo(i32 %mul2)
  ret void
}
Transformation doesn't verify! (unsound)
ERROR: Source is more defined than target

Example:
i32 %b = #x00000000 (0)
i32 %s = undef

Source:
i32 %mul0 = #x00000000 (0)
Function @foo returned
i32 %b1 = #x00000002 (2)
i32 %mul1 = #x00000006 (6)	[based on undef]
Function @foo returned
i32 %b2 = #x00000004 (4)
i32 %mul2 = #x0000000c (12)	[based on undef]
void = function did not return!

SOURCE MEMORY STATE
===================
NON-LOCAL BLOCKS:
Block 0 >	size: 0	align: 1	alloc type: 0	alive: false	address: #x0
Block 1 >	size: 0	align: 4	alloc type: 0	alive: true	address: #x4

Target:
i32 %mul0 = #x00000000 (0)
Function @foo returned
i32 %#1 = #x00000000 (0)
i32 %mul1 = #x00000000 (0)
Function @foo returned
i32 %#2 = #x00000000 (0)
i32 %mul2 = #x00000000 (0)
void = function did not return!

TARGET MEMORY STATE
===================
NON-LOCAL BLOCKS:
Block 0 >	size: 0	align: 1	alloc type: 0	alive: false	address: #x0
Block 1 >	size: 0	align: 4	alloc type: 0	alive: true	address: #x4


Pass: StraightLineStrengthReducePass
Command line: '/home/nlopes/llvm/build/bin/opt' '-load=/home/nlopes/alive2/build/tv/tv.so' '-load-pass-plugin=/home/nlopes/alive2/build/tv/tv.so' '-tv-exit-on-error' '-passes=slsr,gvn' '-S' '-tv-smt-to=20000' '-tv-report-dir=/home/nlopes/alive2/build/logs' '-tv-smt-stats'

Wrote bitcode to: "/home/nlopes/alive2/build/logs/in_M9BbTcpr_NLTO.bc"

------------------- SMT STATS -------------------
Num queries: 52
Num invalid: 0
Num skips:   0
Num trivial: 12 (18.8%)
Num timeout: 6 (11.5%)
Num errors:  0 (0.0%)
Num SAT:     43 (82.7%)
Num UNSAT:   3 (5.8%)
Alive2: Transform doesn't verify; aborting!

stderr:

Transforms/StraightLineStrengthReduce/slsr-mul.ll' FAILED ********************
Exit Code: 2

Command Output (stdout):
--
# RUN: at line 1
/home/nlopes/alive2/build/opt-alive.sh < /bitbucket/nlopes/llvm/llvm/test/Transforms/StraightLineStrengthReduce/slsr-mul.ll -passes=slsr,gvn -S | /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/StraightLineStrengthReduce/slsr-mul.ll
# executed command: /home/nlopes/alive2/build/opt-alive.sh -passes=slsr,gvn -S
# .---command stderr------------
# `-----------------------------
# error: command failed with exit status: 1
# executed command: /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/StraightLineStrengthReduce/slsr-mul.ll
# .---command stderr------------
# | FileCheck error: '<stdin>' is empty.
# | FileCheck command line:  /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/StraightLineStrengthReduce/slsr-mul.ll
# `-----------------------------
# error: command failed with exit status: 2

--

 

NOTE: This test would pass if undef didn't exist!

 

<-- Back