Test Failure: Transforms/InstCombine/ffs-1.ll

Test source: git

Log:

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

----------------------------------------
define i32 @test_simplify1() {
%0:
  %ret = ffs i32 0
  ret i32 %ret
}
Transformation seems to be correct! (syntactically equal)

-- 3. InstCombinePass

----------------------------------------
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

----------------------------------------
define i32 @test_simplify2() {
%0:
  %ret = call i32 @ffsl(i32 0)
  ret i32 %ret
}
Transformation seems to be correct! (syntactically equal)

-- 7. InstCombinePass

----------------------------------------
define i32 @test_simplify2() {
%0:
  %ret = call i32 @ffsl(i32 0)
  ret i32 %ret
}
Transformation seems to be correct! (syntactically equal)

-- 8. PassManager<Function> : Skipping NOP
-- 9. PassManager<Function> : Skipping NOP
-- 10. InstCombinePass

----------------------------------------
define i32 @test_simplify3() {
%0:
  %ret = call i32 @ffsll(i64 0)
  ret i32 %ret
}
Transformation seems to be correct! (syntactically equal)

-- 11. InstCombinePass

----------------------------------------
define i32 @test_simplify3() {
%0:
  %ret = call i32 @ffsll(i64 0)
  ret i32 %ret
}
Transformation seems to be correct! (syntactically equal)

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

----------------------------------------
define i32 @test_simplify4() {
%0:
  %ret = ffs i32 1
  ret i32 %ret
}
Transformation seems to be correct! (syntactically equal)

-- 15. InstCombinePass

----------------------------------------
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

----------------------------------------
define i32 @test_simplify5() {
%0:
  %ret = ffs i32 2048
  ret i32 %ret
}
Transformation seems to be correct! (syntactically equal)

-- 19. InstCombinePass

----------------------------------------
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

----------------------------------------
define i32 @test_simplify6() {
%0:
  %ret = ffs i32 65536
  ret i32 %ret
}
Transformation seems to be correct! (syntactically equal)

-- 23. InstCombinePass

----------------------------------------
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

----------------------------------------
define i32 @test_simplify7() {
%0:
  %ret = call i32 @ffsl(i32 65536)
  ret i32 %ret
}
Transformation seems to be correct! (syntactically equal)

-- 27. InstCombinePass

----------------------------------------
define i32 @test_simplify7() {
%0:
  %ret = call i32 @ffsl(i32 65536)
  ret i32 %ret
}
Transformation seems to be correct! (syntactically equal)

-- 28. PassManager<Function> : Skipping NOP
-- 29. PassManager<Function> : Skipping NOP
-- 30. InstCombinePass

----------------------------------------
define i32 @test_simplify8() {
%0:
  %ret = call i32 @ffsll(i64 1024)
  ret i32 %ret
}
Transformation seems to be correct! (syntactically equal)

-- 31. InstCombinePass

----------------------------------------
define i32 @test_simplify8() {
%0:
  %ret = call i32 @ffsll(i64 1024)
  ret i32 %ret
}
Transformation seems to be correct! (syntactically equal)

-- 32. PassManager<Function> : Skipping NOP
-- 33. PassManager<Function> : Skipping NOP
-- 34. InstCombinePass

----------------------------------------
define i32 @test_simplify9() {
%0:
  %ret = call i32 @ffsll(i64 65536)
  ret i32 %ret
}
Transformation seems to be correct! (syntactically equal)

-- 35. InstCombinePass

----------------------------------------
define i32 @test_simplify9() {
%0:
  %ret = call i32 @ffsll(i64 65536)
  ret i32 %ret
}
Transformation seems to be correct! (syntactically equal)

-- 36. PassManager<Function> : Skipping NOP
-- 37. PassManager<Function> : Skipping NOP
-- 38. InstCombinePass

----------------------------------------
define i32 @test_simplify10() {
%0:
  %ret = call i32 @ffsll(i64 17179869184)
  ret i32 %ret
}
Transformation seems to be correct! (syntactically equal)

-- 39. InstCombinePass

----------------------------------------
define i32 @test_simplify10() {
%0:
  %ret = call i32 @ffsll(i64 17179869184)
  ret i32 %ret
}
Transformation seems to be correct! (syntactically equal)

-- 40. PassManager<Function> : Skipping NOP
-- 41. PassManager<Function> : Skipping NOP
-- 42. InstCombinePass

----------------------------------------
define i32 @test_simplify11() {
%0:
  %ret = call i32 @ffsll(i64 281474976710656)
  ret i32 %ret
}
Transformation seems to be correct! (syntactically equal)

-- 43. InstCombinePass

----------------------------------------
define i32 @test_simplify11() {
%0:
  %ret = call i32 @ffsll(i64 281474976710656)
  ret i32 %ret
}
Transformation seems to be correct! (syntactically equal)

-- 44. PassManager<Function> : Skipping NOP
-- 45. PassManager<Function> : Skipping NOP
-- 46. InstCombinePass

----------------------------------------
define i32 @test_simplify12() {
%0:
  %ret = call i32 @ffsll(i64 1152921504606846976)
  ret i32 %ret
}
Transformation seems to be correct! (syntactically equal)

-- 47. InstCombinePass

----------------------------------------
define i32 @test_simplify12() {
%0:
  %ret = call i32 @ffsll(i64 1152921504606846976)
  ret i32 %ret
}
Transformation seems to be correct! (syntactically equal)

-- 48. PassManager<Function> : Skipping NOP
-- 49. PassManager<Function> : Skipping NOP
-- 50. InstCombinePass

----------------------------------------
define i32 @test_simplify13(i32 %x) {
%0:
  %ret = ffs i32 %x
  ret i32 %ret
}
Transformation seems to be correct! (syntactically equal)

-- 51. InstCombinePass

----------------------------------------
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! (unsound)
ERROR: Target is more poisonous than source

Example:
i32 %x = undef

Source:
i32 %ret = #x00000000 (0)	[based on undef value]

Target:
i32 %cttz = #x0000000c (12)
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

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'


------------------- SMT STATS -------------------
Num queries: 17
Num invalid: 0
Num skips:   0
Num trivial: 33 (66.0%)
Num timeout: 0 (0.0%)
Num errors:  0 (0.0%)
Num SAT:     16 (94.1%)
Num UNSAT:   1 (5.9%)
Alive2: Transform doesn't verify; aborting!

stderr:

+ : 'RUN: at line 3'
+ /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!

 

<-- Back