Test source: git
Source: <stdin> ---------------------------------------- define i32 @test_simplify1() { %0: %ret = ffs i32 0 ret i32 %ret } => define i32 @test_simplify1() { %0: ret i32 0 } Transformation seems to be correct! ---------------------------------------- define i32 @test_simplify2() { %0: %ret = call i32 @ffsl(i32 0) ret i32 %ret } => define i32 @test_simplify2() { %0: %ret = call i32 @ffsl(i32 0) ret i32 %ret } Transformation seems to be correct! ---------------------------------------- define i32 @test_simplify3() { %0: %ret = call i32 @ffsll(i64 0) ret i32 %ret } => define i32 @test_simplify3() { %0: %ret = call i32 @ffsll(i64 0) ret i32 %ret } Transformation seems to be correct! ---------------------------------------- define i32 @test_simplify4() { %0: %ret = ffs i32 1 ret i32 %ret } => define i32 @test_simplify4() { %0: ret i32 1 } Transformation seems to be correct! ---------------------------------------- define i32 @test_simplify5() { %0: %ret = ffs i32 2048 ret i32 %ret } => define i32 @test_simplify5() { %0: ret i32 12 } Transformation seems to be correct! ---------------------------------------- define i32 @test_simplify6() { %0: %ret = ffs i32 65536 ret i32 %ret } => define i32 @test_simplify6() { %0: ret i32 17 } Transformation seems to be correct! ---------------------------------------- define i32 @test_simplify7() { %0: %ret = call i32 @ffsl(i32 65536) ret i32 %ret } => define i32 @test_simplify7() { %0: %ret = call i32 @ffsl(i32 65536) ret i32 %ret } Transformation seems to be correct! ---------------------------------------- define i32 @test_simplify8() { %0: %ret = call i32 @ffsll(i64 1024) ret i32 %ret } => define i32 @test_simplify8() { %0: %ret = call i32 @ffsll(i64 1024) ret i32 %ret } Transformation seems to be correct! ---------------------------------------- define i32 @test_simplify9() { %0: %ret = call i32 @ffsll(i64 65536) ret i32 %ret } => define i32 @test_simplify9() { %0: %ret = call i32 @ffsll(i64 65536) ret i32 %ret } Transformation seems to be correct! ---------------------------------------- define i32 @test_simplify10() { %0: %ret = call i32 @ffsll(i64 17179869184) ret i32 %ret } => define i32 @test_simplify10() { %0: %ret = call i32 @ffsll(i64 17179869184) ret i32 %ret } Transformation seems to be correct! ---------------------------------------- define i32 @test_simplify11() { %0: %ret = call i32 @ffsll(i64 281474976710656) ret i32 %ret } => define i32 @test_simplify11() { %0: %ret = call i32 @ffsll(i64 281474976710656) ret i32 %ret } Transformation seems to be correct! ---------------------------------------- define i32 @test_simplify12() { %0: %ret = call i32 @ffsll(i64 1152921504606846976) ret i32 %ret } => define i32 @test_simplify12() { %0: %ret = call i32 @ffsll(i64 1152921504606846976) ret i32 %ret } Transformation seems to be correct! ---------------------------------------- define i32 @test_simplify13(i32 %x) { %0: %ret = ffs i32 %x ret i32 %ret } => define i32 @test_simplify13(i32 %x) { %0: %cttz = cttz i32 %x, 1 %range_l#0%cttz = icmp sge i32 %cttz, 0 %range_h#0%cttz = icmp slt i32 %cttz, 33 %range#0%cttz = and i1 %range_l#0%cttz, %range_h#0%cttz assume_non_poison i1 %range#0%cttz %1 = add nsw nuw i32 %cttz, 1 %.not = icmp eq i32 %x, 0 %2 = select i1 %.not, i32 0, i32 %1 ret i32 %2 } Transformation doesn't verify! ERROR: Target is more poisonous than source Example: i32 %x = undef Source: i32 %ret = #x00000000 (0) [based on undef value] Target: i32 %cttz = #x00000000 (0) i1 %range_l#0%cttz = #x1 (1) i1 %range_h#0%cttz = #x1 (1) i1 %range#0%cttz = #x1 (1) i32 %1 = poison i1 %.not = #x0 (0) i32 %2 = poison Source value: #x00000000 (0) Target value: poison ------------------- SMT STATS ------------------- Num queries: 16 Num invalid: 0 Num skips: 0 Num trivial: 73 (82.0%) Num timeout: 0 (0.0%) Num errors: 0 (0.0%) Num SAT: 15 (93.8%) Num UNSAT: 1 (6.2%)
+ : 'RUN: at line 3' + /home/nlopes/alive2/build/opt-alive.sh -instcombine -S + /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/InstCombine/ffs-1.ll --check-prefix=ALL --check-prefix=GENERIC Alive2: Transform doesn't verify; aborting! FileCheck error: '<stdin>' is empty. FileCheck command line: /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/InstCombine/ffs-1.ll --check-prefix=ALL --check-prefix=GENERIC
NOTE: This test would pass if undef didn't exist!