Test source: git
Source: <stdin> -- 1. ModuleToFunctionPassAdaptor -- 1. PassManager<Function> : Skipping NOP -- 2. InstCombinePass ---------------------------------------- declare i32 @ffs(i32) define i32 @test_simplify1() { #0: %ret = ffs i32 0 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 3. InstCombinePass ---------------------------------------- declare i32 @ffs(i32) 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! -- 4. PassManager<Function> : Skipping NOP -- 5. PassManager<Function> : Skipping NOP -- 6. InstCombinePass ---------------------------------------- declare i32 @ffsl(i32) define i32 @test_simplify2() { #0: %ret = ffs i32 0 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 7. InstCombinePass ---------------------------------------- declare i32 @ffsl(i32) define i32 @test_simplify2() { #0: %ret = ffs i32 0 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 8. PassManager<Function> : Skipping NOP -- 9. PassManager<Function> : Skipping NOP -- 10. InstCombinePass ---------------------------------------- declare i32 @ffsll(i64) define i32 @test_simplify3() { #0: %ret#beftrunc = ffs i64 0 %ret = trunc i64 %ret#beftrunc to i32 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 11. InstCombinePass ---------------------------------------- declare i32 @ffsll(i64) define i32 @test_simplify3() { #0: %ret#beftrunc = ffs i64 0 %ret = trunc i64 %ret#beftrunc to i32 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 12. PassManager<Function> : Skipping NOP -- 13. PassManager<Function> : Skipping NOP -- 14. InstCombinePass ---------------------------------------- declare i32 @ffs(i32) define i32 @test_simplify4() { #0: %ret = ffs i32 1 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 15. InstCombinePass ---------------------------------------- declare i32 @ffs(i32) 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! -- 16. PassManager<Function> : Skipping NOP -- 17. PassManager<Function> : Skipping NOP -- 18. InstCombinePass ---------------------------------------- declare i32 @ffs(i32) define i32 @test_simplify5() { #0: %ret = ffs i32 2048 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 19. InstCombinePass ---------------------------------------- declare i32 @ffs(i32) 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! -- 20. PassManager<Function> : Skipping NOP -- 21. PassManager<Function> : Skipping NOP -- 22. InstCombinePass ---------------------------------------- declare i32 @ffs(i32) define i32 @test_simplify6() { #0: %ret = ffs i32 65536 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 23. InstCombinePass ---------------------------------------- declare i32 @ffs(i32) 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! -- 24. PassManager<Function> : Skipping NOP -- 25. PassManager<Function> : Skipping NOP -- 26. InstCombinePass ---------------------------------------- declare i32 @ffsl(i32) define i32 @test_simplify7() { #0: %ret = ffs i32 65536 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 27. InstCombinePass ---------------------------------------- declare i32 @ffsl(i32) define i32 @test_simplify7() { #0: %ret = ffs i32 65536 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 28. PassManager<Function> : Skipping NOP -- 29. PassManager<Function> : Skipping NOP -- 30. InstCombinePass ---------------------------------------- declare i32 @ffsll(i64) define i32 @test_simplify8() { #0: %ret#beftrunc = ffs i64 1024 %ret = trunc i64 %ret#beftrunc to i32 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 31. InstCombinePass ---------------------------------------- declare i32 @ffsll(i64) define i32 @test_simplify8() { #0: %ret#beftrunc = ffs i64 1024 %ret = trunc i64 %ret#beftrunc to i32 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 32. PassManager<Function> : Skipping NOP -- 33. PassManager<Function> : Skipping NOP -- 34. InstCombinePass ---------------------------------------- declare i32 @ffsll(i64) define i32 @test_simplify9() { #0: %ret#beftrunc = ffs i64 65536 %ret = trunc i64 %ret#beftrunc to i32 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 35. InstCombinePass ---------------------------------------- declare i32 @ffsll(i64) define i32 @test_simplify9() { #0: %ret#beftrunc = ffs i64 65536 %ret = trunc i64 %ret#beftrunc to i32 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 36. PassManager<Function> : Skipping NOP -- 37. PassManager<Function> : Skipping NOP -- 38. InstCombinePass ---------------------------------------- declare i32 @ffsll(i64) define i32 @test_simplify10() { #0: %ret#beftrunc = ffs i64 17179869184 %ret = trunc i64 %ret#beftrunc to i32 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 39. InstCombinePass ---------------------------------------- declare i32 @ffsll(i64) define i32 @test_simplify10() { #0: %ret#beftrunc = ffs i64 17179869184 %ret = trunc i64 %ret#beftrunc to i32 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 40. PassManager<Function> : Skipping NOP -- 41. PassManager<Function> : Skipping NOP -- 42. InstCombinePass ---------------------------------------- declare i32 @ffsll(i64) define i32 @test_simplify11() { #0: %ret#beftrunc = ffs i64 281474976710656 %ret = trunc i64 %ret#beftrunc to i32 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 43. InstCombinePass ---------------------------------------- declare i32 @ffsll(i64) define i32 @test_simplify11() { #0: %ret#beftrunc = ffs i64 281474976710656 %ret = trunc i64 %ret#beftrunc to i32 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 44. PassManager<Function> : Skipping NOP -- 45. PassManager<Function> : Skipping NOP -- 46. InstCombinePass ---------------------------------------- declare i32 @ffsll(i64) define i32 @test_simplify12() { #0: %ret#beftrunc = ffs i64 1152921504606846976 %ret = trunc i64 %ret#beftrunc to i32 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 47. InstCombinePass ---------------------------------------- declare i32 @ffsll(i64) define i32 @test_simplify12() { #0: %ret#beftrunc = ffs i64 1152921504606846976 %ret = trunc i64 %ret#beftrunc to i32 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 48. PassManager<Function> : Skipping NOP -- 49. PassManager<Function> : Skipping NOP -- 50. InstCombinePass ---------------------------------------- declare i32 @ffs(i32) define i32 @test_simplify13(i32 %x) { #0: %ret = ffs i32 %x ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 51. InstCombinePass ---------------------------------------- declare i32 @ffs(i32) 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_0_%cttz = !range i32 %cttz, i32 0, i32 33 %#1 = add nsw nuw i32 %#range_0_%cttz, 1 %.not = icmp eq i32 %x, 0 %ret = select i1 %.not, i32 0, i32 %#1 ret i32 %ret } Transformation doesn't verify! (unsound) ERROR: Target is more poisonous than source Example: i32 %x = undef Source: i32 %ret = #x00000000 (0) [based on undef value] Target: i32 %cttz = poison i32 %#range_0_%cttz = poison i32 %#1 = poison i1 %.not = #x0 (0) i32 %ret = poison Source value: #x00000000 (0) Target value: poison Pass: InstCombinePass 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=instcombine' '-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_otLOgKNK_1MJK.bc" ------------------- SMT STATS ------------------- Num queries: 18 Num invalid: 0 Num skips: 0 Num trivial: 30 (62.5%) Num timeout: 0 (0.0%) Num errors: 0 (0.0%) Num SAT: 16 (88.9%) Num UNSAT: 2 (11.1%) Alive2: Transform doesn't verify; aborting!
RUN: at line 3: /home/nlopes/alive2/build/opt-alive.sh < /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/ffs-1.ll -passes=instcombine -S | /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/ffs-1.ll --check-prefix=ALL --check-prefix=GENERIC + /home/nlopes/alive2/build/opt-alive.sh -passes=instcombine -S + /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/ffs-1.ll --check-prefix=ALL --check-prefix=GENERIC FileCheck error: '<stdin>' is empty. FileCheck command line: /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/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!