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

Test source: git

Log:

Source: <stdin>

----------------------------------------
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
}
=>
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!
ERROR: Source is more defined than target

Example:
i32 %b = #xd880d60b (3632322059, -662645237)
i32 %s = undef

Source:
i32 %mul0 = #x00000000 (0)	[based on undef value]
i32 %b1 = #xd880d60c (3632322060, -662645236)
i32 %mul1 = #x00000000 (0)	[based on undef value]
i32 %b2 = #xd880d60d (3632322061, -662645235)
i32 %mul2 = #x00000000 (0)	[based on undef value]

SOURCE MEMORY STATE
===================
NON-LOCAL BLOCKS:
Block 0 >	size: 0	align: 1	alloc type: 0
Block 1 >	size: 0	align: 1

Target:
i32 %mul0 = #xd5248840 (3575941184, -719026112)
i32 %mul1 = #x87b8e13f (2277040447, -2017926849)
i32 %mul2 = #x82558400 (2186642432, -2108324864)



------------------- SMT STATS -------------------
Num queries: 5
Num invalid: 0
Num skips:   0
Num trivial: 10 (66.7%)
Num timeout: 2 (40.0%)
Num errors:  0 (0.0%)
Num SAT:     3 (60.0%)
Num UNSAT:   0 (0.0%)
Alive2: Transform doesn't verify; aborting!

stderr:

+ : 'RUN: at line 1'
+ /home/nlopes/alive2/build/opt-alive.sh -slsr -gvn -S
+ /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/StraightLineStrengthReduce/slsr-mul.ll

FileCheck error: '<stdin>' is empty.
FileCheck command line:  /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/StraightLineStrengthReduce/slsr-mul.ll

 

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

 

<-- Back