Test source: git
Source: <stdin> ---------------------------------------- define void @shl(i32 %b, i32 %s) { %0: %t1 = add i32 %b, %s call void @foo(i32 %t1) %s2 = shl i32 %s, 1 %t2 = add i32 %b, %s2 call void @foo(i32 %t2) ret void } => define void @shl(i32 %b, i32 %s) { %0: %t1 = add i32 %b, %s call void @foo(i32 %t1) %t2 = add i32 %t1, %s call void @foo(i32 %t2) ret void } Transformation doesn't verify! ERROR: Timeout ---------------------------------------- define void @stride_is_2s(i32 %b, i32 %s) { %0: %s2 = shl i32 %s, 1 %t1 = add i32 %b, %s2 call void @foo(i32 %t1) %s4 = shl i32 %s, 2 %t2 = add i32 %b, %s4 call void @foo(i32 %t2) %s6 = mul i32 %s, 6 %t3 = add i32 %b, %s6 call void @foo(i32 %t3) ret void } => define void @stride_is_2s(i32 %b, i32 %s) { %0: %s2 = shl i32 %s, 1 %t1 = add i32 %b, %s2 call void @foo(i32 %t1) %t2 = add i32 %t1, %s2 call void @foo(i32 %t2) %t3 = add i32 %t2, %s2 call void @foo(i32 %t3) ret void } Transformation doesn't verify! ERROR: Source is more defined than target Example: i32 %b = any i32 %s = undef Source: i32 %s2 = #x00000000 (0) [based on undef value] i32 %t1 = any i32 %s4 = #x00000000 (0) [based on undef value] i32 %t2 = any i32 %s6 = #x00000000 (0) [based on undef value] i32 %t3 = any SOURCE MEMORY STATE =================== NON-LOCAL BLOCKS: Block 0 > size: 0 align: 1 alloc type: 0 Block 1 > size: 0 align: 1 Target: i32 %s2 = #x1a000000 (436207616) i32 %t1 = any i32 %t2 = any i32 %t3 = any ------------------- SMT STATS ------------------- Num queries: 14 Num invalid: 0 Num skips: 0 Num trivial: 12 (46.2%) Num timeout: 1 (7.1%) Num errors: 0 (0.0%) Num SAT: 6 (42.9%) Num UNSAT: 7 (50.0%) Alive2: Transform doesn't verify; aborting!
+ : 'RUN: at line 2' + /home/nlopes/alive2/build/opt-alive.sh -slsr -gvn -S + /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/StraightLineStrengthReduce/slsr-add.ll FileCheck error: '<stdin>' is empty. FileCheck command line: /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/StraightLineStrengthReduce/slsr-add.ll
NOTE: This test would pass if undef didn't exist!