Test Failure: Transforms/InstCombine/cttz.ll

Test source: git

Log:

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

----------------------------------------
define i32 @cttz_zext_zero_undef(i16 %x) {
#0:
  %z = zext i16 %x to i32
  %tz = cttz i32 %z, 1
  ret i32 %tz
}
Transformation seems to be correct! (syntactically equal)

-- 3. InstCombinePass

----------------------------------------
define i32 @cttz_zext_zero_undef(i16 %x) {
#0:
  %z = zext i16 %x to i32
  %tz = cttz i32 %z, 1
  ret i32 %tz
}
=>
define i32 @cttz_zext_zero_undef(i16 %x) {
#0:
  %#1 = cttz i16 %x, 1
  %#1_range = !range i16 %#1, i16 0, i16 17
  %tz = zext nneg i16 %#1_range to i32
  ret i32 %tz
}
Transformation seems to be correct!

-- 4. PassManager<Function> : Skipping NOP
-- 5. PassManager<Function> : Skipping NOP
-- 6. InstCombinePass

----------------------------------------
define i32 @cttz_zext_zero_def(i16 %x) {
#0:
  %z = zext i16 %x to i32
  %tz = cttz i32 %z, 0
  ret i32 %tz
}
Transformation seems to be correct! (syntactically equal)

-- 7. InstCombinePass

----------------------------------------
define i32 @cttz_zext_zero_def(i16 %x) {
#0:
  %z = zext i16 %x to i32
  %tz = cttz i32 %z, 0
  ret i32 %tz
}
=>
define i32 @cttz_zext_zero_def(i16 %x) {
#0:
  %z = zext i16 %x to i32
  %tz = cttz i32 %z, 0
  %tz_range = !range i32 %tz, i32 0, i32 33
  ret i32 %tz_range
}
Transformation seems to be correct!

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

----------------------------------------
declare void @use(i32)

define i32 @cttz_zext_zero_undef_extra_use(i16 %x) {
#0:
  %z = zext i16 %x to i32
  call void @use(i32 %z)
  %tz = cttz i32 %z, 1
  ret i32 %tz
}
Transformation seems to be correct! (syntactically equal)

-- 11. InstCombinePass

----------------------------------------
declare void @use(i32)

define i32 @cttz_zext_zero_undef_extra_use(i16 %x) {
#0:
  %z = zext i16 %x to i32
  call void @use(i32 %z)
  %tz = cttz i32 %z, 1
  ret i32 %tz
}
=>
declare void @use(i32)

define i32 @cttz_zext_zero_undef_extra_use(i16 %x) {
#0:
  %z = zext i16 %x to i32
  call void @use(i32 %z)
  %tz = cttz i32 %z, 1
  %tz_range = !range i32 %tz, i32 0, i32 33
  ret i32 %tz_range
}
Transformation seems to be correct!

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

----------------------------------------
define <2 x i64> @cttz_zext_zero_undef_vec(<2 x i32> %x) {
#0:
  %z = zext <2 x i32> %x to <2 x i64>
  %tz = cttz <2 x i64> %z, 1
  ret <2 x i64> %tz
}
Transformation seems to be correct! (syntactically equal)

-- 15. InstCombinePass

----------------------------------------
define <2 x i64> @cttz_zext_zero_undef_vec(<2 x i32> %x) {
#0:
  %z = zext <2 x i32> %x to <2 x i64>
  %tz = cttz <2 x i64> %z, 1
  ret <2 x i64> %tz
}
=>
define <2 x i64> @cttz_zext_zero_undef_vec(<2 x i32> %x) {
#0:
  %#1 = cttz <2 x i32> %x, 1
  %#1_range = !range <2 x i32> %#1, i32 0, i32 33
  %tz = zext nneg <2 x i32> %#1_range to <2 x i64>
  ret <2 x i64> %tz
}
Transformation seems to be correct!

-- 16. PassManager<Function> : Skipping NOP
-- 17. PassManager<Function> : Skipping NOP
-- 18. InstCombinePass

----------------------------------------
define <2 x i64> @cttz_zext_zero_def_vec(<2 x i32> %x) {
#0:
  %z = zext <2 x i32> %x to <2 x i64>
  %tz = cttz <2 x i64> %z, 0
  ret <2 x i64> %tz
}
Transformation seems to be correct! (syntactically equal)

-- 19. InstCombinePass

----------------------------------------
define <2 x i64> @cttz_zext_zero_def_vec(<2 x i32> %x) {
#0:
  %z = zext <2 x i32> %x to <2 x i64>
  %tz = cttz <2 x i64> %z, 0
  ret <2 x i64> %tz
}
=>
define <2 x i64> @cttz_zext_zero_def_vec(<2 x i32> %x) {
#0:
  %z = zext <2 x i32> %x to <2 x i64>
  %tz = cttz <2 x i64> %z, 0
  %tz_range = !range <2 x i64> %tz, i64 0, i64 65
  ret <2 x i64> %tz_range
}
Transformation seems to be correct!

-- 20. PassManager<Function> : Skipping NOP
-- 21. PassManager<Function> : Skipping NOP
-- 22. InstCombinePass

----------------------------------------
define i32 @cttz_sext_zero_undef(i16 %x) {
#0:
  %s = sext i16 %x to i32
  %tz = cttz i32 %s, 1
  ret i32 %tz
}
Transformation seems to be correct! (syntactically equal)

-- 23. InstCombinePass

----------------------------------------
define i32 @cttz_sext_zero_undef(i16 %x) {
#0:
  %s = sext i16 %x to i32
  %tz = cttz i32 %s, 1
  ret i32 %tz
}
=>
define i32 @cttz_sext_zero_undef(i16 %x) {
#0:
  %#1 = cttz i16 %x, 1
  %#1_range = !range i16 %#1, i16 0, i16 17
  %tz = zext nneg i16 %#1_range to i32
  ret i32 %tz
}
Transformation seems to be correct!

-- 24. PassManager<Function> : Skipping NOP
-- 25. PassManager<Function> : Skipping NOP
-- 26. InstCombinePass

----------------------------------------
define i32 @cttz_sext_zero_def(i16 %x) {
#0:
  %s = sext i16 %x to i32
  %tz = cttz i32 %s, 0
  ret i32 %tz
}
Transformation seems to be correct! (syntactically equal)

-- 27. InstCombinePass

----------------------------------------
define i32 @cttz_sext_zero_def(i16 %x) {
#0:
  %s = sext i16 %x to i32
  %tz = cttz i32 %s, 0
  ret i32 %tz
}
=>
define i32 @cttz_sext_zero_def(i16 %x) {
#0:
  %#1 = zext i16 %x to i32
  %tz = cttz i32 %#1, 0
  %tz_range = !range i32 %tz, i32 0, i32 33
  ret i32 %tz_range
}
Transformation seems to be correct!

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

----------------------------------------
declare void @use(i32)

define i32 @cttz_sext_zero_undef_extra_use(i16 %x) {
#0:
  %s = sext i16 %x to i32
  call void @use(i32 %s)
  %tz = cttz i32 %s, 1
  ret i32 %tz
}
Transformation seems to be correct! (syntactically equal)

-- 31. InstCombinePass

----------------------------------------
declare void @use(i32)

define i32 @cttz_sext_zero_undef_extra_use(i16 %x) {
#0:
  %s = sext i16 %x to i32
  call void @use(i32 %s)
  %tz = cttz i32 %s, 1
  ret i32 %tz
}
=>
declare void @use(i32)

define i32 @cttz_sext_zero_undef_extra_use(i16 %x) {
#0:
  %s = sext i16 %x to i32
  call void @use(i32 %s)
  %tz = cttz i32 %s, 1
  %tz_range = !range i32 %tz, i32 0, i32 33
  ret i32 %tz_range
}
Transformation seems to be correct!

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

----------------------------------------
define <2 x i64> @cttz_sext_zero_undef_vec(<2 x i32> %x) {
#0:
  %s = sext <2 x i32> %x to <2 x i64>
  %tz = cttz <2 x i64> %s, 1
  ret <2 x i64> %tz
}
Transformation seems to be correct! (syntactically equal)

-- 35. InstCombinePass

----------------------------------------
define <2 x i64> @cttz_sext_zero_undef_vec(<2 x i32> %x) {
#0:
  %s = sext <2 x i32> %x to <2 x i64>
  %tz = cttz <2 x i64> %s, 1
  ret <2 x i64> %tz
}
=>
define <2 x i64> @cttz_sext_zero_undef_vec(<2 x i32> %x) {
#0:
  %#1 = cttz <2 x i32> %x, 1
  %#1_range = !range <2 x i32> %#1, i32 0, i32 33
  %tz = zext nneg <2 x i32> %#1_range to <2 x i64>
  ret <2 x i64> %tz
}
Transformation seems to be correct!

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

----------------------------------------
define <2 x i64> @cttz_sext_zero_def_vec(<2 x i32> %x) {
#0:
  %s = sext <2 x i32> %x to <2 x i64>
  %tz = cttz <2 x i64> %s, 0
  ret <2 x i64> %tz
}
Transformation seems to be correct! (syntactically equal)

-- 39. InstCombinePass

----------------------------------------
define <2 x i64> @cttz_sext_zero_def_vec(<2 x i32> %x) {
#0:
  %s = sext <2 x i32> %x to <2 x i64>
  %tz = cttz <2 x i64> %s, 0
  ret <2 x i64> %tz
}
=>
define <2 x i64> @cttz_sext_zero_def_vec(<2 x i32> %x) {
#0:
  %#1 = zext <2 x i32> %x to <2 x i64>
  %tz = cttz <2 x i64> %#1, 0
  %tz_range = !range <2 x i64> %tz, i64 0, i64 65
  ret <2 x i64> %tz_range
}
Transformation seems to be correct!

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

----------------------------------------
define i32 @cttz_of_lowest_set_bit(i32 %x) {
#0:
  %sub = sub i32 0, %x
  %and = and i32 %sub, %x
  %tz = cttz i32 %and, 0
  ret i32 %tz
}
Transformation seems to be correct! (syntactically equal)

-- 43. InstCombinePass

----------------------------------------
define i32 @cttz_of_lowest_set_bit(i32 %x) {
#0:
  %sub = sub i32 0, %x
  %and = and i32 %sub, %x
  %tz = cttz i32 %and, 0
  ret i32 %tz
}
=>
define i32 @cttz_of_lowest_set_bit(i32 %x) {
#0:
  %tz = cttz i32 %x, 0
  %tz_range = !range i32 %tz, i32 0, i32 33
  ret i32 %tz_range
}
Transformation seems to be correct!

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

----------------------------------------
define i32 @cttz_of_lowest_set_bit_commuted(i32 %xx) {
#0:
  %x = udiv i32 42, %xx
  %sub = sub i32 0, %x
  %and = and i32 %x, %sub
  %tz = cttz i32 %and, 0
  ret i32 %tz
}
Transformation seems to be correct! (syntactically equal)

-- 47. InstCombinePass

----------------------------------------
define i32 @cttz_of_lowest_set_bit_commuted(i32 %xx) {
#0:
  %x = udiv i32 42, %xx
  %sub = sub i32 0, %x
  %and = and i32 %x, %sub
  %tz = cttz i32 %and, 0
  ret i32 %tz
}
=>
define i32 @cttz_of_lowest_set_bit_commuted(i32 %xx) {
#0:
  %x = udiv i32 42, %xx
  %tz = cttz i32 %x, 0
  %tz_range = !range i32 %tz, i32 0, i32 33
  ret i32 %tz_range
}
Transformation seems to be correct!

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

----------------------------------------
define i32 @cttz_of_lowest_set_bit_poison_flag(i32 %x) {
#0:
  %sub = sub i32 0, %x
  %and = and i32 %sub, %x
  %tz = cttz i32 %and, 1
  ret i32 %tz
}
Transformation seems to be correct! (syntactically equal)

-- 51. InstCombinePass

----------------------------------------
define i32 @cttz_of_lowest_set_bit_poison_flag(i32 %x) {
#0:
  %sub = sub i32 0, %x
  %and = and i32 %sub, %x
  %tz = cttz i32 %and, 1
  ret i32 %tz
}
=>
define i32 @cttz_of_lowest_set_bit_poison_flag(i32 %x) {
#0:
  %tz = cttz i32 %x, 1
  %tz_range = !range i32 %tz, i32 0, i32 33
  ret i32 %tz_range
}
Transformation seems to be correct!

-- 52. PassManager<Function> : Skipping NOP
-- 53. PassManager<Function> : Skipping NOP
-- 54. InstCombinePass

----------------------------------------
define <2 x i64> @cttz_of_lowest_set_bit_vec(<2 x i64> %x) {
#0:
  %sub = sub <2 x i64> { 0, 0 }, %x
  %and = and <2 x i64> %sub, %x
  %tz = cttz <2 x i64> %and, 0
  ret <2 x i64> %tz
}
Transformation seems to be correct! (syntactically equal)

-- 55. InstCombinePass

----------------------------------------
define <2 x i64> @cttz_of_lowest_set_bit_vec(<2 x i64> %x) {
#0:
  %sub = sub <2 x i64> { 0, 0 }, %x
  %and = and <2 x i64> %sub, %x
  %tz = cttz <2 x i64> %and, 0
  ret <2 x i64> %tz
}
=>
define <2 x i64> @cttz_of_lowest_set_bit_vec(<2 x i64> %x) {
#0:
  %tz = cttz <2 x i64> %x, 0
  %tz_range = !range <2 x i64> %tz, i64 0, i64 65
  ret <2 x i64> %tz_range
}
Transformation doesn't verify! (not unsound)
ERROR: Timeout
-- 56. PassManager<Function> : Skipping NOP
-- 57. PassManager<Function> : Skipping NOP
-- 58. InstCombinePass

----------------------------------------
define <2 x i64> @cttz_of_lowest_set_bit_vec_undef(<2 x i64> %x) {
#0:
  %sub = sub <2 x i64> { 0, 0 }, %x
  %and = and <2 x i64> %sub, %x
  %tz = cttz <2 x i64> %and, 0
  ret <2 x i64> %tz
}
Transformation seems to be correct! (syntactically equal)

-- 59. InstCombinePass

----------------------------------------
define <2 x i64> @cttz_of_lowest_set_bit_vec_undef(<2 x i64> %x) {
#0:
  %sub = sub <2 x i64> { 0, 0 }, %x
  %and = and <2 x i64> %sub, %x
  %tz = cttz <2 x i64> %and, 0
  ret <2 x i64> %tz
}
=>
define <2 x i64> @cttz_of_lowest_set_bit_vec_undef(<2 x i64> %x) {
#0:
  %tz = cttz <2 x i64> %x, 0
  %tz_range = !range <2 x i64> %tz, i64 0, i64 65
  ret <2 x i64> %tz_range
}
Transformation doesn't verify! (not unsound)
ERROR: Timeout
-- 60. PassManager<Function> : Skipping NOP
-- 61. PassManager<Function> : Skipping NOP
-- 62. InstCombinePass

----------------------------------------
define i32 @cttz_of_lowest_set_bit_wrong_const(i32 %x) {
#0:
  %sub = sub i32 1, %x
  %and = and i32 %sub, %x
  %tz = cttz i32 %and, 0
  ret i32 %tz
}
Transformation seems to be correct! (syntactically equal)

-- 63. InstCombinePass

----------------------------------------
define i32 @cttz_of_lowest_set_bit_wrong_const(i32 %x) {
#0:
  %sub = sub i32 1, %x
  %and = and i32 %sub, %x
  %tz = cttz i32 %and, 0
  ret i32 %tz
}
=>
define i32 @cttz_of_lowest_set_bit_wrong_const(i32 %x) {
#0:
  %sub = sub i32 1, %x
  %and = and i32 %sub, %x
  %tz = cttz i32 %and, 0
  %tz_range = !range i32 %tz, i32 1, i32 33
  ret i32 %tz_range
}
Transformation doesn't verify! (unsound)
ERROR: Target is more poisonous than source

Example:
i32 %x = undef

Source:
i32 %sub = #x00000001 (1)	[based on undef value]
i32 %and = #x00000000 (0)	[based on undef value]
i32 %tz = #x00000020 (32)

Target:
i32 %sub = #x00000001 (1)
i32 %and = #x00000001 (1)
i32 %tz = #x00000000 (0)
i32 %tz_range = poison
Source value: #x00000020 (32)
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' '-S' '-passes=instcombine' '-tv-smt-to=20000' '-tv-report-dir=/home/nlopes/alive2/build/logs' '-tv-smt-stats'
Wrote bitcode to: "/home/nlopes/alive2/build/logs/in_tMzUL1RE_9yZq.bc"


------------------- SMT STATS -------------------
Num queries: 89
Num invalid: 0
Num skips:   0
Num trivial: 48 (35.0%)
Num timeout: 2 (2.2%)
Num errors:  0 (0.0%)
Num SAT:     37 (41.6%)
Num UNSAT:   50 (56.2%)
Alive2: Transform doesn't verify; aborting!

stderr:

RUN: at line 2: /home/nlopes/alive2/build/opt-alive.sh < /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/cttz.ll -S -passes=instcombine | /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/cttz.ll
+ /home/nlopes/alive2/build/opt-alive.sh -S -passes=instcombine
+ /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/cttz.ll

FileCheck error: '<stdin>' is empty.
FileCheck command line:  /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/cttz.ll

 

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

 

<-- Back