Test Failure: Transforms/InstCombine/icmp.ll

Test source: git

Log:

Source: <stdin>
ERROR: Unsupported instruction:   %p1 = getelementptr inbounds i32, i32 addrspace(1)* getelementptr inbounds ([1000 x i32], [1000 x i32] addrspace(1)* @X_as1, i64 0, i64 0), i64 %i
ERROR: Unsupported instruction:   %bit = addrspacecast i8* %foo to i32 addrspace(3)*
ERROR: Unsupported instruction:   %bit = addrspacecast i8* %foo to i32 addrspace(1)*
ERROR: Unsupported instruction:   %xchg = cmpxchg i32* %sc, i32 %old_val, i32 %new_val seq_cst seq_cst, align 4
ERROR: Unsupported instruction:   %__constexpr_2 = ptrtoint i1 (i16)* @f10 to i8
ERROR: Unsupported instruction:   %__constexpr_1 = zext i8 ptrtoint (i1 (i16)* @f10 to i8) to i16
ERROR: Unsupported instruction:   %__constexpr_4 = ptrtoint i1 (i16)* @f10 to i8
ERROR: Unsupported instruction:   %__constexpr_3 = zext i8 ptrtoint (i1 (i16)* @f10 to i8) to i16
ERROR: Unsupported instruction:   %__constexpr_0 = mul i16 zext (i8 ptrtoint (i1 (i16)* @f10 to i8) to i16), zext (i8 ptrtoint (i1 (i16)* @f10 to i8) to i16)
ERROR: Unsupported instruction:   %cmp580 = icmp ule i16 mul (i16 zext (i8 ptrtoint (i1 (i16)* @f10 to i8) to i16), i16 zext (i8 ptrtoint (i1 (i16)* @f10 to i8) to i16)), %p
ERROR: Unsupported type: ppc_fp128
ERROR: Unsupported instruction:   %s2 = fpext float %x to ppc_fp128
ERROR: Unsupported type: ppc_fp128

----------------------------------------
define i32 @test1(i32 %X) {
%0:
  %a = icmp slt i32 %X, 0
  %b = zext i1 %a to i32
  ret i32 %b
}
=>
define i32 @test1(i32 %X) {
%0:
  %X.lobit = lshr i32 %X, 31
  ret i32 %X.lobit
}
Transformation seems to be correct!


----------------------------------------
define <2 x i32> @test1vec(<2 x i32> %X) {
%0:
  %a = icmp slt <2 x i32> %X, { 0, 0 }
  %b = zext <2 x i1> %a to <2 x i32>
  ret <2 x i32> %b
}
=>
define <2 x i32> @test1vec(<2 x i32> %X) {
%0:
  %X.lobit = lshr <2 x i32> %X, { 31, 31 }
  ret <2 x i32> %X.lobit
}
Transformation seems to be correct!


----------------------------------------
define i32 @test2(i32 %X) {
%0:
  %a = icmp ult i32 %X, 2147483648
  %b = zext i1 %a to i32
  ret i32 %b
}
=>
define i32 @test2(i32 %X) {
%0:
  %1 = xor i32 %X, 4294967295
  %X.lobit.not = lshr i32 %1, 31
  ret i32 %X.lobit.not
}
Transformation seems to be correct!


----------------------------------------
define <2 x i32> @test2vec(<2 x i32> %X) {
%0:
  %a = icmp ult <2 x i32> %X, { 2147483648, 2147483648 }
  %b = zext <2 x i1> %a to <2 x i32>
  ret <2 x i32> %b
}
=>
define <2 x i32> @test2vec(<2 x i32> %X) {
%0:
  %1 = xor <2 x i32> %X, { 4294967295, 4294967295 }
  %X.lobit.not = lshr <2 x i32> %1, { 31, 31 }
  ret <2 x i32> %X.lobit.not
}
Transformation seems to be correct!


----------------------------------------
define i32 @test3(i32 %X) {
%0:
  %a = icmp slt i32 %X, 0
  %b = sext i1 %a to i32
  ret i32 %b
}
=>
define i32 @test3(i32 %X) {
%0:
  %X.lobit = ashr i32 %X, 31
  ret i32 %X.lobit
}
Transformation seems to be correct!


----------------------------------------
define i32 @test4(i32 %X) {
%0:
  %a = icmp ult i32 %X, 2147483648
  %b = sext i1 %a to i32
  ret i32 %b
}
=>
define i32 @test4(i32 %X) {
%0:
  %X.lobit = ashr i32 %X, 31
  %X.lobit.not = xor i32 %X.lobit, 4294967295
  ret i32 %X.lobit.not
}
Transformation seems to be correct!


----------------------------------------
define <2 x i1> @test5_eq(<2 x i64> %x) {
%0:
  %V = icmp eq <2 x i64> %x, undef
  ret <2 x i1> %V
}
=>
define <2 x i1> @test5_eq(<2 x i64> %x) {
%0:
  ret <2 x i1> undef
}
Transformation seems to be correct!


----------------------------------------
define <2 x i1> @test5_ne(<2 x i64> %x) {
%0:
  %V = icmp ne <2 x i64> %x, undef
  ret <2 x i1> %V
}
=>
define <2 x i1> @test5_ne(<2 x i64> %x) {
%0:
  ret <2 x i1> undef
}
Transformation seems to be correct!


----------------------------------------
define <2 x i1> @test5_ugt(<2 x i64> %x) {
%0:
  %V = icmp ugt <2 x i64> %x, undef
  ret <2 x i1> %V
}
=>
define <2 x i1> @test5_ugt(<2 x i64> %x) {
%0:
  ret <2 x i1> { 0, 0 }
}
Transformation seems to be correct!


----------------------------------------
define <2 x i1> @test5_zero() {
%0:
  %V = icmp eq <2 x i64> { 0, 0 }, undef
  ret <2 x i1> %V
}
=>
define <2 x i1> @test5_zero() {
%0:
  ret <2 x i1> undef
}
Transformation seems to be correct!


----------------------------------------
define i32 @test6(i32 %a, i32 %b) {
%0:
  %c = icmp sle i32 %a, 4294967295
  %d = zext i1 %c to i32
  %e = sub i32 0, %d
  %f = and i32 %e, %b
  ret i32 %f
}
=>
define i32 @test6(i32 %a, i32 %b) {
%0:
  %a.lobit.neg = ashr i32 %a, 31
  %f = and i32 %a.lobit.neg, %b
  ret i32 %f
}
Transformation seems to be correct!


----------------------------------------
define i1 @test7(i32 %x) {
%0:
  %a = add i32 %x, 4294967295
  %b = icmp ult i32 %a, %x
  ret i1 %b
}
=>
define i1 @test7(i32 %x) {
%0:
  %b = icmp ne i32 %x, 0
  ret i1 %b
}
Transformation seems to be correct!


----------------------------------------
define <2 x i1> @test7_vec(<2 x i32> %x) {
%0:
  %a = add <2 x i32> %x, { 4294967295, 4294967295 }
  %b = icmp ult <2 x i32> %a, %x
  ret <2 x i1> %b
}
=>
define <2 x i1> @test7_vec(<2 x i32> %x) {
%0:
  %b = icmp ne <2 x i32> %x, { 0, 0 }
  ret <2 x i1> %b
}
Transformation seems to be correct!


----------------------------------------
define i1 @test8(i32 %x) {
%0:
  %a = add i32 %x, 4294967295
  %b = icmp eq i32 %a, %x
  ret i1 %b
}
=>
define i1 @test8(i32 %x) {
%0:
  ret i1 0
}
Transformation seems to be correct!


----------------------------------------
define <2 x i1> @test8_vec(<2 x i32> %x) {
%0:
  %a = add <2 x i32> %x, { 4294967295, 4294967295 }
  %b = icmp eq <2 x i32> %a, %x
  ret <2 x i1> %b
}
=>
define <2 x i1> @test8_vec(<2 x i32> %x) {
%0:
  ret <2 x i1> { 0, 0 }
}
Transformation seems to be correct!


----------------------------------------
define i1 @test9(i32 %x) {
%0:
  %a = add i32 %x, 4294967294
  %b = icmp ugt i32 %x, %a
  ret i1 %b
}
=>
define i1 @test9(i32 %x) {
%0:
  %b = icmp ugt i32 %x, 1
  ret i1 %b
}
Transformation seems to be correct!


----------------------------------------
define <2 x i1> @test9_vec(<2 x i32> %x) {
%0:
  %a = add <2 x i32> %x, { 4294967294, 4294967294 }
  %b = icmp ugt <2 x i32> %x, %a
  ret <2 x i1> %b
}
=>
define <2 x i1> @test9_vec(<2 x i32> %x) {
%0:
  %b = icmp ugt <2 x i32> %x, { 1, 1 }
  ret <2 x i1> %b
}
Transformation seems to be correct!


----------------------------------------
define i1 @test9b(i32 %x) {
%0:
  %a = add i32 %x, 4294967294
  %b = icmp ugt i32 %a, %x
  ret i1 %b
}
=>
define i1 @test9b(i32 %x) {
%0:
  %b = icmp ult i32 %x, 2
  ret i1 %b
}
Transformation seems to be correct!


----------------------------------------
define <2 x i1> @test9b_vec(<2 x i32> %x) {
%0:
  %a = add <2 x i32> %x, { 4294967294, 4294967294 }
  %b = icmp ugt <2 x i32> %a, %x
  ret <2 x i1> %b
}
=>
define <2 x i1> @test9b_vec(<2 x i32> %x) {
%0:
  %b = icmp ult <2 x i32> %x, { 2, 2 }
  ret <2 x i1> %b
}
Transformation seems to be correct!


----------------------------------------
define i1 @test10(i32 %x) {
%0:
  %a = add i32 %x, 4294967295
  %b = icmp slt i32 %a, %x
  ret i1 %b
}
=>
define i1 @test10(i32 %x) {
%0:
  %b = icmp ne i32 %x, 2147483648
  ret i1 %b
}
Transformation seems to be correct!


----------------------------------------
define <2 x i1> @test10_vec(<2 x i32> %x) {
%0:
  %a = add <2 x i32> %x, { 4294967295, 4294967295 }
  %b = icmp slt <2 x i32> %a, %x
  ret <2 x i1> %b
}
=>
define <2 x i1> @test10_vec(<2 x i32> %x) {
%0:
  %b = icmp ne <2 x i32> %x, { 2147483648, 2147483648 }
  ret <2 x i1> %b
}
Transformation seems to be correct!


----------------------------------------
define i1 @test10b(i32 %x) {
%0:
  %a = add i32 %x, 4294967295
  %b = icmp sgt i32 %a, %x
  ret i1 %b
}
=>
define i1 @test10b(i32 %x) {
%0:
  %b = icmp eq i32 %x, 2147483648
  ret i1 %b
}
Transformation seems to be correct!


----------------------------------------
define <2 x i1> @test10b_vec(<2 x i32> %x) {
%0:
  %a = add <2 x i32> %x, { 4294967295, 4294967295 }
  %b = icmp sgt <2 x i32> %a, %x
  ret <2 x i1> %b
}
=>
define <2 x i1> @test10b_vec(<2 x i32> %x) {
%0:
  %b = icmp eq <2 x i32> %x, { 2147483648, 2147483648 }
  ret <2 x i1> %b
}
Transformation seems to be correct!


----------------------------------------
define i1 @test11(i32 %x) {
%0:
  %a = add nsw i32 %x, 8
  %b = icmp slt i32 %x, %a
  ret i1 %b
}
=>
define i1 @test11(i32 %x) {
%0:
  ret i1 1
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define <2 x i1> @test11_vec(<2 x i32> %x) {
%0:
  %a = add nsw <2 x i32> %x, { 8, 8 }
  %b = icmp slt <2 x i32> %x, %a
  ret <2 x i1> %b
}
=>
define <2 x i1> @test11_vec(<2 x i32> %x) {
%0:
  ret <2 x i1> { 1, 1 }
}
Transformation seems to be correct!


----------------------------------------
define i1 @test12(i1 %A) {
%0:
  %S = select i1 %A, i64 -4294967295, i64 8589934591
  %__constexpr_0 = bitcast <2 x i32> { 1, 4294967295 } to i64
  %B = icmp ne i64 %__constexpr_0, %S
  ret i1 %B
}
=>
define i1 @test12(i1 %A) {
%0:
  %not.A = xor i1 %A, 1
  ret i1 %not.A
}
Transformation seems to be correct!


----------------------------------------
define i1 @test13(i8 %X) {
%0:
  %cmp = icmp slt i8 undef, %X
  ret i1 %cmp
}
=>
define i1 @test13(i8 %X) {
%0:
  ret i1 0
}
Transformation seems to be correct!


----------------------------------------
define i1 @test14(i8 %X) {
%0:
  %cmp = icmp slt i8 undef, 128
  ret i1 %cmp
}
=>
define i1 @test14(i8 %X) {
%0:
  ret i1 0
}
Transformation seems to be correct!


----------------------------------------
define i1 @test15() {
%0:
  %cmp = icmp eq i8 undef, 128
  ret i1 %cmp
}
=>
define i1 @test15() {
%0:
  ret i1 undef
}
Transformation seems to be correct!


----------------------------------------
define i1 @test16() {
%0:
  %cmp = icmp ne i8 undef, 128
  ret i1 %cmp
}
=>
define i1 @test16() {
%0:
  ret i1 undef
}
Transformation seems to be correct!


----------------------------------------
define i1 @test17(i32 %x) {
%0:
  %shl = shl i32 1, %x
  %and = and i32 %shl, 8
  %cmp = icmp eq i32 %and, 0
  ret i1 %cmp
}
=>
define i1 @test17(i32 %x) {
%0:
  %cmp = icmp ne i32 %x, 3
  ret i1 %cmp
}
Transformation seems to be correct!


----------------------------------------
define <2 x i1> @test17vec(<2 x i32> %x) {
%0:
  %shl = shl <2 x i32> { 1, 1 }, %x
  %and = and <2 x i32> %shl, { 8, 8 }
  %cmp = icmp eq <2 x i32> %and, { 0, 0 }
  ret <2 x i1> %cmp
}
=>
define <2 x i1> @test17vec(<2 x i32> %x) {
%0:
  %cmp = icmp ne <2 x i32> %x, { 3, 3 }
  ret <2 x i1> %cmp
}
Transformation seems to be correct!


----------------------------------------
define i1 @test17a(i32 %x) {
%0:
  %shl = shl i32 1, %x
  %and = and i32 %shl, 7
  %cmp = icmp eq i32 %and, 0
  ret i1 %cmp
}
=>
define i1 @test17a(i32 %x) {
%0:
  %cmp = icmp ugt i32 %x, 2
  ret i1 %cmp
}
Transformation seems to be correct!


----------------------------------------
define <2 x i1> @test17a_vec(<2 x i32> %x) {
%0:
  %shl = shl <2 x i32> { 1, 1 }, %x
  %and = and <2 x i32> %shl, { 7, 7 }
  %cmp = icmp eq <2 x i32> %and, { 0, 0 }
  ret <2 x i1> %cmp
}
=>
define <2 x i1> @test17a_vec(<2 x i32> %x) {
%0:
  %cmp = icmp ugt <2 x i32> %x, { 2, 2 }
  ret <2 x i1> %cmp
}
Transformation seems to be correct!


----------------------------------------
define i1 @test18_eq(i32 %x) {
%0:
  %sh = lshr i32 8, %x
  %and = and i32 %sh, 1
  %cmp = icmp eq i32 %and, 0
  ret i1 %cmp
}
=>
define i1 @test18_eq(i32 %x) {
%0:
  %cmp = icmp ne i32 %x, 3
  ret i1 %cmp
}
Transformation seems to be correct!


----------------------------------------
define <2 x i1> @test18_eq_vec(<2 x i32> %x) {
%0:
  %sh = lshr <2 x i32> { 8, 8 }, %x
  %and = and <2 x i32> %sh, { 1, 1 }
  %cmp = icmp eq <2 x i32> %and, { 0, 0 }
  ret <2 x i1> %cmp
}
=>
define <2 x i1> @test18_eq_vec(<2 x i32> %x) {
%0:
  %cmp = icmp ne <2 x i32> %x, { 3, 3 }
  ret <2 x i1> %cmp
}
Transformation seems to be correct!


----------------------------------------
define i1 @test18_ne(i32 %x) {
%0:
  %sh = lshr i32 8, %x
  %and = and i32 %sh, 1
  %cmp = icmp ne i32 %and, 0
  ret i1 %cmp
}
=>
define i1 @test18_ne(i32 %x) {
%0:
  %cmp = icmp eq i32 %x, 3
  ret i1 %cmp
}
Transformation seems to be correct!


----------------------------------------
define <2 x i1> @test18_ne_vec(<2 x i32> %x) {
%0:
  %sh = lshr <2 x i32> { 8, 8 }, %x
  %and = and <2 x i32> %sh, { 1, 1 }
  %cmp = icmp ne <2 x i32> %and, { 0, 0 }
  ret <2 x i1> %cmp
}
=>
define <2 x i1> @test18_ne_vec(<2 x i32> %x) {
%0:
  %cmp = icmp eq <2 x i32> %x, { 3, 3 }
  ret <2 x i1> %cmp
}
Transformation seems to be correct!


----------------------------------------
define i1 @test19(i32 %x) {
%0:
  %shl = shl i32 1, %x
  %and = and i32 %shl, 8
  %cmp = icmp eq i32 %and, 8
  ret i1 %cmp
}
=>
define i1 @test19(i32 %x) {
%0:
  %cmp = icmp eq i32 %x, 3
  ret i1 %cmp
}
Transformation seems to be correct!


----------------------------------------
define <2 x i1> @test19vec(<2 x i32> %x) {
%0:
  %shl = shl <2 x i32> { 1, 1 }, %x
  %and = and <2 x i32> %shl, { 8, 8 }
  %cmp = icmp eq <2 x i32> %and, { 8, 8 }
  ret <2 x i1> %cmp
}
=>
define <2 x i1> @test19vec(<2 x i32> %x) {
%0:
  %cmp = icmp eq <2 x i32> %x, { 3, 3 }
  ret <2 x i1> %cmp
}
Transformation seems to be correct!


----------------------------------------
define <2 x i1> @cmp_and_signbit_vec(<2 x i3> %x) {
%0:
  %and = and <2 x i3> %x, { 4, 4 }
  %cmp = icmp ne <2 x i3> %and, { 0, 0 }
  ret <2 x i1> %cmp
}
=>
define <2 x i1> @cmp_and_signbit_vec(<2 x i3> %x) {
%0:
  %cmp = icmp slt <2 x i3> %x, { 0, 0 }
  ret <2 x i1> %cmp
}
Transformation seems to be correct!


----------------------------------------
define i1 @test20(i32 %x) {
%0:
  %shl = shl i32 1, %x
  %and = and i32 %shl, 8
  %cmp = icmp ne i32 %and, 0
  ret i1 %cmp
}
=>
define i1 @test20(i32 %x) {
%0:
  %cmp = icmp eq i32 %x, 3
  ret i1 %cmp
}
Transformation seems to be correct!


----------------------------------------
define <2 x i1> @test20vec(<2 x i32> %x) {
%0:
  %shl = shl <2 x i32> { 1, 1 }, %x
  %and = and <2 x i32> %shl, { 8, 8 }
  %cmp = icmp ne <2 x i32> %and, { 0, 0 }
  ret <2 x i1> %cmp
}
=>
define <2 x i1> @test20vec(<2 x i32> %x) {
%0:
  %cmp = icmp eq <2 x i32> %x, { 3, 3 }
  ret <2 x i1> %cmp
}
Transformation seems to be correct!


----------------------------------------
define i1 @test20a(i32 %x) {
%0:
  %shl = shl i32 1, %x
  %and = and i32 %shl, 7
  %cmp = icmp ne i32 %and, 0
  ret i1 %cmp
}
=>
define i1 @test20a(i32 %x) {
%0:
  %cmp = icmp ult i32 %x, 3
  ret i1 %cmp
}
Transformation seems to be correct!


----------------------------------------
define <2 x i1> @test20a_vec(<2 x i32> %x) {
%0:
  %shl = shl <2 x i32> { 1, 1 }, %x
  %and = and <2 x i32> %shl, { 7, 7 }
  %cmp = icmp ne <2 x i32> %and, { 0, 0 }
  ret <2 x i1> %cmp
}
=>
define <2 x i1> @test20a_vec(<2 x i32> %x) {
%0:
  %cmp = icmp ult <2 x i32> %x, { 3, 3 }
  ret <2 x i1> %cmp
}
Transformation seems to be correct!


----------------------------------------
define i1 @test21(i8 %x, i8 %y) {
%0:
  %A = or i8 %x, 1
  %B = icmp ugt i8 %A, 3
  ret i1 %B
}
=>
define i1 @test21(i8 %x, i8 %y) {
%0:
  %B = icmp ugt i8 %x, 3
  ret i1 %B
}
Transformation seems to be correct!


----------------------------------------
define i1 @test22(i8 %x, i8 %y) {
%0:
  %A = or i8 %x, 1
  %B = icmp ult i8 %A, 4
  ret i1 %B
}
=>
define i1 @test22(i8 %x, i8 %y) {
%0:
  %B = icmp ult i8 %x, 4
  ret i1 %B
}
Transformation seems to be correct!


----------------------------------------
define i1 @test23(i32 %x) {
%0:
  %i3 = sdiv i32 %x, 2966332661
  %i4 = icmp eq i32 %i3, 4294967295
  ret i1 %i4
}
=>
define i1 @test23(i32 %x) {
%0:
  %i4 = icmp sgt i32 %x, 1328634634
  ret i1 %i4
}
Transformation seems to be correct!


----------------------------------------
define <2 x i1> @test23vec(<2 x i32> %x) {
%0:
  %i3 = sdiv <2 x i32> %x, { 2966332661, 2966332661 }
  %i4 = icmp eq <2 x i32> %i3, { 4294967295, 4294967295 }
  ret <2 x i1> %i4
}
=>
define <2 x i1> @test23vec(<2 x i32> %x) {
%0:
  %i4 = icmp sgt <2 x i32> %x, { 1328634634, 1328634634 }
  ret <2 x i1> %i4
}
Transformation seems to be correct!


----------------------------------------
@X = global 4000 bytes, align 16

define i1 @test24(i64 %i) {
%0:
  %__constexpr_0 = gep inbounds * @X, 4000 x i64 0, 4 x i64 0
  %p1 = gep inbounds * %__constexpr_0, 4 x i64 %i
  %__constexpr_1 = gep inbounds * @X, 4000 x i64 1, 4 x i64 0
  %cmp = icmp eq * %p1, %__constexpr_1, use_provenance
  ret i1 %cmp
}
=>
@X = global 4000 bytes, align 16

define i1 @test24(i64 %i) {
%0:
  %cmp = icmp eq i64 %i, 1000
  ret i1 %cmp
}
Transformation seems to be correct!


----------------------------------------
define i1 @test24_neg_offs(* %p, i64 %offs) {
%0:
  %p1 = gep inbounds * %p, 4 x i64 %offs
  %conv1 = ptrtoint * %p to i64
  %conv2 = ptrtoint * %p1 to i64
  %delta = sub i64 %conv1, %conv2
  %cmp = icmp eq i64 %delta, 8
  ret i1 %cmp
}
=>
define i1 @test24_neg_offs(* %p, i64 %offs) {
%0:
  %p1.idx.neg = mul i64 %offs, -4
  %cmp = icmp eq i64 %p1.idx.neg, 8
  ret i1 %cmp
}
Transformation seems to be correct!


----------------------------------------
define i1 @test27(i32 %x, i32 %y, i32 %z) {
%0:
  %lhs = sub nsw i32 %x, %z
  %rhs = sub nsw i32 %y, %z
  %c = icmp sgt i32 %lhs, %rhs
  ret i1 %c
}
=>
define i1 @test27(i32 %x, i32 %y, i32 %z) {
%0:
  %c = icmp sgt i32 %x, %y
  ret i1 %c
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define i1 @test27_extra_uses(i32 %x, i32 %y, i32 %z) {
%0:
  %lhs = sub nsw i32 %x, %z
  call void @foo(i32 %lhs)
  %rhs = sub nsw i32 %y, %z
  call void @foo(i32 %rhs)
  %c = icmp sgt i32 %lhs, %rhs
  ret i1 %c
}
=>
define i1 @test27_extra_uses(i32 %x, i32 %y, i32 %z) {
%0:
  %lhs = sub nsw i32 %x, %z
  call void @foo(i32 %lhs)
  %rhs = sub nsw i32 %y, %z
  call void @foo(i32 %rhs)
  %c = icmp sgt i32 %x, %y
  ret i1 %c
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define i1 @test28(i32 %x, i32 %y, i32 %z) {
%0:
  %lhs = sub nuw i32 %x, %z
  %rhs = sub nuw i32 %y, %z
  %c = icmp ugt i32 %lhs, %rhs
  ret i1 %c
}
=>
define i1 @test28(i32 %x, i32 %y, i32 %z) {
%0:
  %c = icmp ugt i32 %x, %y
  ret i1 %c
}
Transformation seems to be correct!


----------------------------------------
define i1 @test28_extra_uses(i32 %x, i32 %y, i32 %z) {
%0:
  %lhs = sub nuw i32 %x, %z
  call void @foo(i32 %lhs)
  %rhs = sub nuw i32 %y, %z
  call void @foo(i32 %rhs)
  %c = icmp ugt i32 %lhs, %rhs
  ret i1 %c
}
=>
define i1 @test28_extra_uses(i32 %x, i32 %y, i32 %z) {
%0:
  %lhs = sub nuw i32 %x, %z
  call void @foo(i32 %lhs)
  %rhs = sub nuw i32 %y, %z
  call void @foo(i32 %rhs)
  %c = icmp ugt i32 %x, %y
  ret i1 %c
}
Transformation seems to be correct!


----------------------------------------
define i1 @ugt_sub(i32 %xsrc, i32 %y) {
%0:
  %x = udiv i32 %xsrc, 42
  %sub = sub i32 %x, %y
  %cmp = icmp ugt i32 %sub, %x
  ret i1 %cmp
}
=>
define i1 @ugt_sub(i32 %xsrc, i32 %y) {
%0:
  %x = udiv i32 %xsrc, 42
  %cmp = icmp ult i32 %x, %y
  ret i1 %cmp
}
Transformation seems to be correct!


----------------------------------------
define <2 x i1> @ult_sub(<2 x i8> %xsrc, <2 x i8> %y) {
%0:
  %x = udiv <2 x i8> %xsrc, { 42, 214 }
  %sub = sub <2 x i8> %x, %y
  %cmp = icmp ult <2 x i8> %x, %sub
  ret <2 x i1> %cmp
}
=>
define <2 x i1> @ult_sub(<2 x i8> %xsrc, <2 x i8> %y) {
%0:
  %x = udiv <2 x i8> %xsrc, { 42, 214 }
  %cmp = icmp ult <2 x i8> %x, %y
  ret <2 x i1> %cmp
}
Transformation seems to be correct!


----------------------------------------
define i1 @test33(i32 %x, i32 %y) {
%0:
  %lhs = sub nsw i32 %x, %y
  %c = icmp sgt i32 %lhs, %x
  ret i1 %c
}
=>
define i1 @test33(i32 %x, i32 %y) {
%0:
  %c = icmp slt i32 %y, 0
  ret i1 %c
}
Transformation seems to be correct!


----------------------------------------
define i1 @test34(i32 %x, i32 %y) {
%0:
  %lhs = sub nuw i32 %x, %y
  %c = icmp ugt i32 %lhs, %x
  ret i1 %c
}
=>
define i1 @test34(i32 %x, i32 %y) {
%0:
  ret i1 0
}
Transformation seems to be correct!


----------------------------------------
define i1 @test35(i32 %x, i32 %y) {
%0:
  %rhs = sub nsw i32 %x, %y
  %c = icmp sgt i32 %x, %rhs
  ret i1 %c
}
=>
define i1 @test35(i32 %x, i32 %y) {
%0:
  %c = icmp sgt i32 %y, 0
  ret i1 %c
}
Transformation seems to be correct!


----------------------------------------
define i1 @test36(i32 %x, i32 %y) {
%0:
  %rhs = sub nuw i32 %x, %y
  %c = icmp ugt i32 %x, %rhs
  ret i1 %c
}
=>
define i1 @test36(i32 %x, i32 %y) {
%0:
  %c = icmp ne i32 %y, 0
  ret i1 %c
}
Transformation seems to be correct!


----------------------------------------
define i1 @test37(i32 %x, i32 %y, i32 %z) {
%0:
  %lhs = sub nsw i32 %x, %y
  %rhs = sub nsw i32 %x, %z
  %c = icmp sgt i32 %lhs, %rhs
  ret i1 %c
}
=>
define i1 @test37(i32 %x, i32 %y, i32 %z) {
%0:
  %c = icmp sgt i32 %z, %y
  ret i1 %c
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define i1 @test37_extra_uses(i32 %x, i32 %y, i32 %z) {
%0:
  %lhs = sub nsw i32 %x, %y
  call void @foo(i32 %lhs)
  %rhs = sub nsw i32 %x, %z
  call void @foo(i32 %rhs)
  %c = icmp sgt i32 %lhs, %rhs
  ret i1 %c
}
=>
define i1 @test37_extra_uses(i32 %x, i32 %y, i32 %z) {
%0:
  %lhs = sub nsw i32 %x, %y
  call void @foo(i32 %lhs)
  %rhs = sub nsw i32 %x, %z
  call void @foo(i32 %rhs)
  %c = icmp sgt i32 %z, %y
  ret i1 %c
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define i32 @neg_max_s32(i32 %x, i32 %y) {
%0:
  %nx = sub nsw i32 0, %x
  %ny = sub nsw i32 0, %y
  %c = icmp slt i32 %nx, %ny
  %s = select i1 %c, i32 %ny, i32 %nx
  %r = sub nsw i32 0, %s
  ret i32 %r
}
=>
define i32 @neg_max_s32(i32 %x, i32 %y) {
%0:
  %c = icmp slt i32 %y, %x
  %s.v = select i1 %c, i32 %y, i32 %x
  ret i32 %s.v
}
Transformation seems to be correct!


----------------------------------------
define <4 x i32> @neg_max_v4s32(<4 x i32> %x, <4 x i32> %y) {
%0:
  %nx = sub nsw <4 x i32> { 0, 0, 0, 0 }, %x
  %ny = sub nsw <4 x i32> { 0, 0, 0, 0 }, %y
  %c = icmp sgt <4 x i32> %nx, %ny
  %s = select <4 x i1> %c, <4 x i32> %nx, <4 x i32> %ny
  %r = sub <4 x i32> { 0, 0, 0, 0 }, %s
  ret <4 x i32> %r
}
=>
define <4 x i32> @neg_max_v4s32(<4 x i32> %x, <4 x i32> %y) {
%0:
  %c = icmp sgt <4 x i32> %y, %x
  %s.v = select <4 x i1> %c, <4 x i32> %x, <4 x i32> %y
  ret <4 x i32> %s.v
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define i1 @test38(i32 %x, i32 %y, i32 %z) {
%0:
  %lhs = sub nuw i32 %x, %y
  %rhs = sub nuw i32 %x, %z
  %c = icmp ugt i32 %lhs, %rhs
  ret i1 %c
}
=>
define i1 @test38(i32 %x, i32 %y, i32 %z) {
%0:
  %c = icmp ugt i32 %z, %y
  ret i1 %c
}
Transformation seems to be correct!


----------------------------------------
define i1 @test38_extra_uses(i32 %x, i32 %y, i32 %z) {
%0:
  %lhs = sub nuw i32 %x, %y
  call void @foo(i32 %lhs)
  %rhs = sub nuw i32 %x, %z
  call void @foo(i32 %rhs)
  %c = icmp ugt i32 %lhs, %rhs
  ret i1 %c
}
=>
define i1 @test38_extra_uses(i32 %x, i32 %y, i32 %z) {
%0:
  %lhs = sub nuw i32 %x, %y
  call void @foo(i32 %lhs)
  %rhs = sub nuw i32 %x, %z
  call void @foo(i32 %rhs)
  %c = icmp ugt i32 %z, %y
  ret i1 %c
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define i1 @test39(i32 %X, i32 %Y) {
%0:
  %A = ashr exact i32 %X, %Y
  %B = icmp eq i32 %A, 0
  ret i1 %B
}
=>
define i1 @test39(i32 %X, i32 %Y) {
%0:
  %B = icmp eq i32 %X, 0
  ret i1 %B
}
Transformation seems to be correct!


----------------------------------------
define <2 x i1> @test39vec(<2 x i32> %X, <2 x i32> %Y) {
%0:
  %A = ashr exact <2 x i32> %X, %Y
  %B = icmp eq <2 x i32> %A, { 0, 0 }
  ret <2 x i1> %B
}
=>
define <2 x i1> @test39vec(<2 x i32> %X, <2 x i32> %Y) {
%0:
  %B = icmp eq <2 x i32> %X, { 0, 0 }
  ret <2 x i1> %B
}
Transformation seems to be correct!


----------------------------------------
define i1 @test40(i32 %X, i32 %Y) {
%0:
  %A = lshr exact i32 %X, %Y
  %B = icmp ne i32 %A, 0
  ret i1 %B
}
=>
define i1 @test40(i32 %X, i32 %Y) {
%0:
  %B = icmp ne i32 %X, 0
  ret i1 %B
}
Transformation seems to be correct!


----------------------------------------
define <2 x i1> @test40vec(<2 x i32> %X, <2 x i32> %Y) {
%0:
  %A = lshr exact <2 x i32> %X, %Y
  %B = icmp ne <2 x i32> %A, { 0, 0 }
  ret <2 x i1> %B
}
=>
define <2 x i1> @test40vec(<2 x i32> %X, <2 x i32> %Y) {
%0:
  %B = icmp ne <2 x i32> %X, { 0, 0 }
  ret <2 x i1> %B
}
Transformation seems to be correct!


----------------------------------------
define i1 @shr_exact(i132 %x) {
%0:
  %sh = ashr exact i132 %x, 4
  %cmp = icmp eq i132 %sh, 2
  ret i1 %cmp
}
=>
define i1 @shr_exact(i132 %x) {
%0:
  %cmp = icmp eq i132 %x, 32
  ret i1 %cmp
}
Transformation seems to be correct!


----------------------------------------
define <2 x i1> @shr_exact_vec(<2 x i132> %x) {
%0:
  %sh = lshr exact <2 x i132> %x, { 4, 4 }
  %cmp = icmp ne <2 x i132> %sh, { 2, 2 }
  ret <2 x i1> %cmp
}
=>
define <2 x i1> @shr_exact_vec(<2 x i132> %x) {
%0:
  %cmp = icmp ne <2 x i132> %x, { 32, 32 }
  ret <2 x i1> %cmp
}
Transformation seems to be correct!


----------------------------------------
define i1 @test41(i32 %X, i32 %Y) {
%0:
  %A = urem i32 %X, %Y
  %B = icmp ugt i32 %Y, %A
  ret i1 %B
}
=>
define i1 @test41(i32 %X, i32 %Y) {
%0:
  ret i1 1
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define i1 @test42(i32 %X, i32 %Y) {
%0:
  %A = srem i32 %X, %Y
  %B = icmp slt i32 %A, %Y
  ret i1 %B
}
=>
define i1 @test42(i32 %X, i32 %Y) {
%0:
  %B = icmp sgt i32 %Y, 4294967295
  ret i1 %B
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define i1 @test43(i32 %X, i32 %Y) {
%0:
  %A = srem i32 %X, %Y
  %B = icmp slt i32 %Y, %A
  ret i1 %B
}
=>
define i1 @test43(i32 %X, i32 %Y) {
%0:
  %B = icmp slt i32 %Y, 0
  ret i1 %B
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define i1 @test44(i32 %X, i32 %Y) {
%0:
  %A = srem i32 %X, %Y
  %B = icmp slt i32 %A, %Y
  ret i1 %B
}
=>
define i1 @test44(i32 %X, i32 %Y) {
%0:
  %B = icmp sgt i32 %Y, 4294967295
  ret i1 %B
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define i1 @test45(i32 %X, i32 %Y) {
%0:
  %A = srem i32 %X, %Y
  %B = icmp slt i32 %Y, %A
  ret i1 %B
}
=>
define i1 @test45(i32 %X, i32 %Y) {
%0:
  %B = icmp slt i32 %Y, 0
  ret i1 %B
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define i1 @test46(i32 %X, i32 %Y, i32 %Z) {
%0:
  %A = ashr exact i32 %X, %Z
  %B = ashr exact i32 %Y, %Z
  %C = icmp ult i32 %A, %B
  ret i1 %C
}
=>
define i1 @test46(i32 %X, i32 %Y, i32 %Z) {
%0:
  %C = icmp ult i32 %X, %Y
  ret i1 %C
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define i1 @test47(i32 %X, i32 %Y, i32 %Z) {
%0:
  %A = ashr exact i32 %X, %Z
  %B = ashr exact i32 %Y, %Z
  %C = icmp ugt i32 %A, %B
  ret i1 %C
}
=>
define i1 @test47(i32 %X, i32 %Y, i32 %Z) {
%0:
  %C = icmp ugt i32 %X, %Y
  ret i1 %C
}
Transformation seems to be correct!


----------------------------------------
define i1 @test48(i32 %X, i32 %Y, i32 %Z) {
%0:
  %A = sdiv exact i32 %X, %Z
  %B = sdiv exact i32 %Y, %Z
  %C = icmp eq i32 %A, %B
  ret i1 %C
}
=>
define i1 @test48(i32 %X, i32 %Y, i32 %Z) {
%0:
  %C = icmp eq i32 %X, %Y
  ret i1 %C
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define i1 @PR32949(i32 %X, i32 %Y, i32 %Z) {
%0:
  %A = sdiv exact i32 %X, %Z
  %B = sdiv exact i32 %Y, %Z
  %C = icmp sgt i32 %A, %B
  ret i1 %C
}
=>
define i1 @PR32949(i32 %X, i32 %Y, i32 %Z) {
%0:
  %A = sdiv exact i32 %X, %Z
  %B = sdiv exact i32 %Y, %Z
  %C = icmp sgt i32 %A, %B
  ret i1 %C
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
define <2 x i1> @test49(<2 x i32> %i3) {
%entry:
  %i11 = and <2 x i32> %i3, { 3, 3 }
  %cmp = icmp ult <2 x i32> %i11, { 4, 4 }
  ret <2 x i1> %cmp
}
=>
define <2 x i1> @test49(<2 x i32> %i3) {
%entry:
  ret <2 x i1> { 1, 1 }
}
Transformation seems to be correct!


----------------------------------------
define i1 @test50(i16 %X, i32 %Y) {
%0:
  %A = zext i16 %X to i32
  %B = srem i32 %A, %Y
  %C = icmp sgt i32 %B, 4294967295
  ret i1 %C
}
=>
define i1 @test50(i16 %X, i32 %Y) {
%0:
  ret i1 1
}
Transformation seems to be correct!


----------------------------------------
define i1 @test51(i32 %X, i32 %Y) {
%0:
  %A = and i32 %X, 2147483648
  %B = srem i32 %A, %Y
  %C = icmp sgt i32 %B, 4294967295
  ret i1 %C
}
=>
define i1 @test51(i32 %X, i32 %Y) {
%0:
  %A = and i32 %X, 2147483648
  %B = srem i32 %A, %Y
  %C = icmp sgt i32 %B, 4294967295
  ret i1 %C
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
define i1 @test52(i32 %x1) {
%0:
  %conv = and i32 %x1, 255
  %cmp = icmp eq i32 %conv, 127
  %i2 = lshr i32 %x1, 16
  %i3 = trunc i32 %i2 to i8
  %cmp15 = icmp eq i8 %i3, 76
  %A = and i1 %cmp, %cmp15
  ret i1 %A
}
=>
define i1 @test52(i32 %x1) {
%0:
  %1 = and i32 %x1, 16711935
  %2 = icmp eq i32 %1, 4980863
  ret i1 %2
}
Transformation seems to be correct!


----------------------------------------
define i1 @test52_logical(i32 %x1) {
%0:
  %conv = and i32 %x1, 255
  %cmp = icmp eq i32 %conv, 127
  %i2 = lshr i32 %x1, 16
  %i3 = trunc i32 %i2 to i8
  %cmp15 = icmp eq i8 %i3, 76
  %A = select i1 %cmp, i1 %cmp15, i1 0
  ret i1 %A
}
=>
define i1 @test52_logical(i32 %x1) {
%0:
  %1 = and i32 %x1, 16711935
  %2 = icmp eq i32 %1, 4980863
  ret i1 %2
}
Transformation seems to be correct!


----------------------------------------
define i1 @test52b(i128 %x1) {
%0:
  %conv = and i128 %x1, 255
  %cmp = icmp eq i128 %conv, 127
  %i2 = lshr i128 %x1, 16
  %i3 = trunc i128 %i2 to i8
  %cmp15 = icmp eq i8 %i3, 76
  %A = and i1 %cmp, %cmp15
  ret i1 %A
}
=>
define i1 @test52b(i128 %x1) {
%0:
  %1 = and i128 %x1, 16711935
  %2 = icmp eq i128 %1, 4980863
  ret i1 %2
}
Transformation seems to be correct!


----------------------------------------
define i1 @test52b_logical(i128 %x1) {
%0:
  %conv = and i128 %x1, 255
  %cmp = icmp eq i128 %conv, 127
  %i2 = lshr i128 %x1, 16
  %i3 = trunc i128 %i2 to i8
  %cmp15 = icmp eq i8 %i3, 76
  %A = select i1 %cmp, i1 %cmp15, i1 0
  ret i1 %A
}
=>
define i1 @test52b_logical(i128 %x1) {
%0:
  %1 = and i128 %x1, 16711935
  %2 = icmp eq i128 %1, 4980863
  ret i1 %2
}
Transformation seems to be correct!


----------------------------------------
define i1 @test53(i32 %a, i32 %b) {
%0:
  %x = sdiv exact i32 %a, 30
  %y = sdiv i32 %b, 30
  %z = icmp eq i32 %x, %y
  ret i1 %z
}
=>
define i1 @test53(i32 %a, i32 %b) {
%0:
  %x = sdiv exact i32 %a, 30
  %y = sdiv i32 %b, 30
  %z = icmp eq i32 %x, %y
  ret i1 %z
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
define i1 @test54(i8 %a) {
%0:
  %ext = zext i8 %a to i32
  %and = and i32 %ext, 192
  %ret = icmp eq i32 %and, 128
  ret i1 %ret
}
=>
define i1 @test54(i8 %a) {
%0:
  %1 = and i8 %a, 192
  %ret = icmp eq i8 %1, 128
  ret i1 %ret
}
Transformation seems to be correct!


----------------------------------------
define i1 @test55(i32 %a) {
%0:
  %sub = sub i32 0, %a
  %cmp = icmp eq i32 %sub, 123
  ret i1 %cmp
}
=>
define i1 @test55(i32 %a) {
%0:
  %cmp = icmp eq i32 %a, 4294967173
  ret i1 %cmp
}
Transformation seems to be correct!


----------------------------------------
define <2 x i1> @test55vec(<2 x i32> %a) {
%0:
  %sub = sub <2 x i32> { 0, 0 }, %a
  %cmp = icmp eq <2 x i32> %sub, { 123, 123 }
  ret <2 x i1> %cmp
}
=>
define <2 x i1> @test55vec(<2 x i32> %a) {
%0:
  %cmp = icmp eq <2 x i32> %a, { 4294967173, 4294967173 }
  ret <2 x i1> %cmp
}
Transformation seems to be correct!


----------------------------------------
define i1 @test56(i32 %a) {
%0:
  %sub = sub i32 10, %a
  %cmp = icmp eq i32 %sub, 123
  ret i1 %cmp
}
=>
define i1 @test56(i32 %a) {
%0:
  %cmp = icmp eq i32 %a, 4294967183
  ret i1 %cmp
}
Transformation seems to be correct!


----------------------------------------
define <2 x i1> @test56vec(<2 x i32> %a) {
%0:
  %sub = sub <2 x i32> { 10, 10 }, %a
  %cmp = icmp eq <2 x i32> %sub, { 123, 123 }
  ret <2 x i1> %cmp
}
=>
define <2 x i1> @test56vec(<2 x i32> %a) {
%0:
  %cmp = icmp eq <2 x i32> %a, { 4294967183, 4294967183 }
  ret <2 x i1> %cmp
}
Transformation seems to be correct!


----------------------------------------
define i1 @test57(i32 %a) {
%0:
  %and = and i32 %a, 4294967294
  %cmp = icmp ne i32 %and, 0
  call void @foo(i32 %and)
  ret i1 %cmp
}
=>
define i1 @test57(i32 %a) {
%0:
  %and = and i32 %a, 4294967294
  %cmp = icmp ne i32 %and, 0
  call void @foo(i32 %and)
  ret i1 %cmp
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
define i1 @cmpabs1(i64 %val) {
%0:
  %sub = sub nsw i64 0, %val
  %cmp = icmp slt i64 %val, 0
  %sub.val = select i1 %cmp, i64 %sub, i64 %val
  %tobool = icmp ne i64 %sub.val, 0
  ret i1 %tobool
}
=>
define i1 @cmpabs1(i64 %val) {
%0:
  %tobool = icmp ne i64 %val, 0
  ret i1 %tobool
}
Transformation seems to be correct!


----------------------------------------
define i1 @cmpabs2(i64 %val) {
%0:
  %sub = sub nsw i64 0, %val
  %cmp = icmp slt i64 %val, 0
  %sub.val = select i1 %cmp, i64 %val, i64 %sub
  %tobool = icmp ne i64 %sub.val, 0
  ret i1 %tobool
}
=>
define i1 @cmpabs2(i64 %val) {
%0:
  %tobool = icmp ne i64 %val, 0
  ret i1 %tobool
}
Transformation seems to be correct!


----------------------------------------
define i1 @abs_intrin_eq_zero(i8 %x) {
%0:
  %abs = abs i8 %x, 0
  %cmp = icmp eq i8 %abs, 0
  ret i1 %cmp
}
=>
define i1 @abs_intrin_eq_zero(i8 %x) {
%0:
  %cmp = icmp eq i8 %x, 0
  ret i1 %cmp
}
Transformation seems to be correct!


----------------------------------------
define i1 @abs_intrin_ne_zero(i8 %x) {
%0:
  %abs = abs i8 %x, 0
  %cmp = icmp ne i8 %abs, 0
  ret i1 %cmp
}
=>
define i1 @abs_intrin_ne_zero(i8 %x) {
%0:
  %cmp = icmp ne i8 %x, 0
  ret i1 %cmp
}
Transformation seems to be correct!


----------------------------------------
define void @test58() {
%0:
  %cast = bitcast <1 x i64> { 36029346783166592 } to i64
  %call = call i32 @test58_d(i64 %cast)
  ret void
}
=>
define void @test58() {
%0:
  %call = call i32 @test58_d(i64 36029346783166592)
  ret void
}
Transformation seems to be correct!


----------------------------------------
define i1 @test59(* %foo) {
%0:
  %bit = bitcast * %foo to *
  %gep1 = gep inbounds * %bit, 4 x i64 2
  %gep2 = gep inbounds * %foo, 1 x i64 10
  %cast1 = bitcast * %gep1 to *
  %cmp = icmp ult * %cast1, %gep2
  %use = ptrtoint * %cast1 to i64
  %call = call i32 @test58_d(i64 %use)
  ret i1 %cmp
}
=>
define i1 @test59(* %foo) {
%0:
  %gep1 = gep inbounds * %foo, 1 x i64 8
  %use = ptrtoint * %gep1 to i64
  %call = call i32 @test58_d(i64 %use)
  ret i1 1
}
Transformation seems to be correct!


----------------------------------------
define i1 @test60(* %foo, i64 %i, i64 %j) {
%0:
  %bit = bitcast * %foo to *
  %gep1 = gep inbounds * %bit, 4 x i64 %i
  %gep2 = gep inbounds * %foo, 1 x i64 %j
  %cast1 = bitcast * %gep1 to *
  %cmp = icmp ult * %cast1, %gep2
  ret i1 %cmp
}
=>
define i1 @test60(* %foo, i64 %i, i64 %j) {
%0:
  %gep1.idx = shl nsw i64 %i, 2
  %1 = icmp slt i64 %gep1.idx, %j
  ret i1 %1
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define i1 @test61(* %foo, i64 %i, i64 %j) {
%0:
  %bit = bitcast * %foo to *
  %gep1 = gep * %bit, 4 x i64 %i
  %gep2 = gep * %foo, 1 x i64 %j
  %cast1 = bitcast * %gep1 to *
  %cmp = icmp ult * %cast1, %gep2
  ret i1 %cmp
}
=>
define i1 @test61(* %foo, i64 %i, i64 %j) {
%0:
  %bit = bitcast * %foo to *
  %gep1 = gep * %bit, 4 x i64 %i
  %gep2 = gep * %foo, 1 x i64 %j
  %cast1 = bitcast * %gep1 to *
  %cmp = icmp ugt * %gep2, %cast1
  ret i1 %cmp
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define i1 @test62(* %a) {
%0:
  %arrayidx1 = gep inbounds * %a, 1 x i64 1
  %arrayidx2 = gep inbounds * %a, 1 x i64 10
  %cmp = icmp slt * %arrayidx1, %arrayidx2, offsetonly
  ret i1 %cmp
}
=>
define i1 @test62(* %a) {
%0:
  ret i1 1
}
Transformation seems to be correct!


----------------------------------------
define i1 @test63(i8 %a, i32 %b) {
%0:
  %z = zext i8 %a to i32
  %t = and i32 %b, 255
  %c = icmp eq i32 %z, %t
  ret i1 %c
}
=>
define i1 @test63(i8 %a, i32 %b) {
%0:
  %1 = trunc i32 %b to i8
  %c = icmp eq i8 %1, %a
  ret i1 %c
}
Transformation seems to be correct!


----------------------------------------
define i1 @test64(i8 %a, i32 %b) {
%0:
  %t = and i32 %b, 255
  %z = zext i8 %a to i32
  %c = icmp eq i32 %t, %z
  ret i1 %c
}
=>
define i1 @test64(i8 %a, i32 %b) {
%0:
  %1 = trunc i32 %b to i8
  %c = icmp eq i8 %1, %a
  ret i1 %c
}
Transformation seems to be correct!


----------------------------------------
define i1 @test65(i64 %A, i64 %B) {
%0:
  %s1 = add i64 %A, %B
  %s2 = add i64 %A, %B
  %cmp = icmp eq i64 %s1, %s2
  ret i1 %cmp
}
=>
define i1 @test65(i64 %A, i64 %B) {
%0:
  ret i1 1
}
Transformation seems to be correct!


----------------------------------------
define i1 @test66(i64 %A, i64 %B) {
%0:
  %s1 = add i64 %A, %B
  %s2 = add i64 %B, %A
  %cmp = icmp eq i64 %s1, %s2
  ret i1 %cmp
}
=>
define i1 @test66(i64 %A, i64 %B) {
%0:
  ret i1 1
}
Transformation seems to be correct!


----------------------------------------
define i1 @test67(i32 %x) {
%0:
  %and = and i32 %x, 127
  %cmp = icmp sgt i32 %and, 31
  ret i1 %cmp
}
=>
define i1 @test67(i32 %x) {
%0:
  %and = and i32 %x, 96
  %cmp = icmp ne i32 %and, 0
  ret i1 %cmp
}
Transformation seems to be correct!


----------------------------------------
define i1 @test67inverse(i32 %x) {
%0:
  %and = and i32 %x, 127
  %cmp = icmp sle i32 %and, 31
  ret i1 %cmp
}
=>
define i1 @test67inverse(i32 %x) {
%0:
  %and = and i32 %x, 96
  %cmp = icmp eq i32 %and, 0
  ret i1 %cmp
}
Transformation seems to be correct!


----------------------------------------
define <2 x i1> @test67vec(<2 x i32> %x) {
%0:
  %and = and <2 x i32> %x, { 96, 96 }
  %cmp = icmp ugt <2 x i32> %and, { 31, 31 }
  ret <2 x i1> %cmp
}
=>
define <2 x i1> @test67vec(<2 x i32> %x) {
%0:
  %and = and <2 x i32> %x, { 96, 96 }
  %cmp = icmp ne <2 x i32> %and, { 0, 0 }
  ret <2 x i1> %cmp
}
Transformation seems to be correct!


----------------------------------------
define <2 x i1> @test67vec2(<2 x i32> %x) {
%0:
  %and = and <2 x i32> %x, { 127, 127 }
  %cmp = icmp ugt <2 x i32> %and, { 31, 31 }
  ret <2 x i1> %cmp
}
=>
define <2 x i1> @test67vec2(<2 x i32> %x) {
%0:
  %and = and <2 x i32> %x, { 96, 96 }
  %cmp = icmp ne <2 x i32> %and, { 0, 0 }
  ret <2 x i1> %cmp
}
Transformation seems to be correct!


----------------------------------------
define <2 x i1> @test67vecinverse(<2 x i32> %x) {
%0:
  %and = and <2 x i32> %x, { 96, 96 }
  %cmp = icmp sle <2 x i32> %and, { 31, 31 }
  ret <2 x i1> %cmp
}
=>
define <2 x i1> @test67vecinverse(<2 x i32> %x) {
%0:
  %and = and <2 x i32> %x, { 96, 96 }
  %cmp = icmp eq <2 x i32> %and, { 0, 0 }
  ret <2 x i1> %cmp
}
Transformation seems to be correct!


----------------------------------------
define i1 @test68(i32 %x) {
%0:
  %and = and i32 %x, 127
  %cmp = icmp sgt i32 %and, 30
  ret i1 %cmp
}
=>
define i1 @test68(i32 %x) {
%0:
  %and = and i32 %x, 127
  %cmp = icmp ugt i32 %and, 30
  ret i1 %cmp
}
Transformation seems to be correct!


----------------------------------------
define i1 @test70(i32 %X) {
%0:
  %A = srem i32 5, %X
  %B = add i32 %A, 2
  %C = icmp ne i32 %B, 4
  ret i1 %C
}
=>
define i1 @test70(i32 %X) {
%0:
  %A = srem i32 5, %X
  %C = icmp ne i32 %A, 2
  ret i1 %C
}
Transformation seems to be correct!


----------------------------------------
define <2 x i1> @test70vec(<2 x i32> %X) {
%0:
  %B = add <2 x i32> %X, { 2, 2 }
  %C = icmp ne <2 x i32> %B, { 4, 4 }
  ret <2 x i1> %C
}
=>
define <2 x i1> @test70vec(<2 x i32> %X) {
%0:
  %C = icmp ne <2 x i32> %X, { 2, 2 }
  ret <2 x i1> %C
}
Transformation seems to be correct!


----------------------------------------
define i1 @icmp_sext16trunc(i32 %x) {
%0:
  %trunc = trunc i32 %x to i16
  %sext = sext i16 %trunc to i32
  %cmp = icmp slt i32 %sext, 36
  ret i1 %cmp
}
=>
define i1 @icmp_sext16trunc(i32 %x) {
%0:
  %1 = trunc i32 %x to i16
  %cmp = icmp slt i16 %1, 36
  ret i1 %cmp
}
Transformation seems to be correct!


----------------------------------------
define i1 @icmp_sext8trunc(i32 %x) {
%0:
  %trunc = trunc i32 %x to i8
  %sext = sext i8 %trunc to i32
  %cmp = icmp slt i32 %sext, 36
  ret i1 %cmp
}
=>
define i1 @icmp_sext8trunc(i32 %x) {
%0:
  %1 = trunc i32 %x to i8
  %cmp = icmp slt i8 %1, 36
  ret i1 %cmp
}
Transformation seems to be correct!


----------------------------------------
define <2 x i1> @icmp_sext8trunc_vec(<2 x i32> %x) {
%0:
  %trunc = trunc <2 x i32> %x to <2 x i8>
  %sext = sext <2 x i8> %trunc to <2 x i32>
  %cmp = icmp slt <2 x i32> %sext, { 36, 36 }
  ret <2 x i1> %cmp
}
=>
define <2 x i1> @icmp_sext8trunc_vec(<2 x i32> %x) {
%0:
  %1 = trunc <2 x i32> %x to <2 x i8>
  %cmp = icmp slt <2 x i8> %1, { 36, 36 }
  ret <2 x i1> %cmp
}
Transformation seems to be correct!


----------------------------------------
define i1 @icmp_shl16(i32 %x) {
%0:
  %shl = shl i32 %x, 16
  %cmp = icmp slt i32 %shl, 2359296
  ret i1 %cmp
}
=>
define i1 @icmp_shl16(i32 %x) {
%0:
  %1 = trunc i32 %x to i16
  %cmp = icmp slt i16 %1, 36
  ret i1 %cmp
}
Transformation seems to be correct!


----------------------------------------
define i1 @icmp_shl17(i32 %x) {
%0:
  %shl = shl i32 %x, 17
  %cmp = icmp slt i32 %shl, 2359296
  ret i1 %cmp
}
=>
define i1 @icmp_shl17(i32 %x) {
%0:
  %shl = shl i32 %x, 17
  %cmp = icmp slt i32 %shl, 2359296
  ret i1 %cmp
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
define <2 x i1> @icmp_shl16_vec(<2 x i32> %x) {
%0:
  %shl = shl <2 x i32> %x, { 16, 16 }
  %cmp = icmp slt <2 x i32> %shl, { 2359296, 2359296 }
  ret <2 x i1> %cmp
}
=>
define <2 x i1> @icmp_shl16_vec(<2 x i32> %x) {
%0:
  %1 = trunc <2 x i32> %x to <2 x i16>
  %cmp = icmp slt <2 x i16> %1, { 36, 36 }
  ret <2 x i1> %cmp
}
Transformation seems to be correct!


----------------------------------------
define i1 @icmp_shl24(i32 %x) {
%0:
  %shl = shl i32 %x, 24
  %cmp = icmp slt i32 %shl, 603979776
  ret i1 %cmp
}
=>
define i1 @icmp_shl24(i32 %x) {
%0:
  %1 = trunc i32 %x to i8
  %cmp = icmp slt i8 %1, 36
  ret i1 %cmp
}
Transformation seems to be correct!


----------------------------------------
define i1 @icmp_shl_eq(i32 %x) {
%0:
  %mul = shl i32 %x, 5
  %cmp = icmp eq i32 %mul, 0
  ret i1 %cmp
}
=>
define i1 @icmp_shl_eq(i32 %x) {
%0:
  %mul.mask = and i32 %x, 134217727
  %cmp = icmp eq i32 %mul.mask, 0
  ret i1 %cmp
}
Transformation seems to be correct!


----------------------------------------
define <2 x i1> @icmp_shl_eq_vec(<2 x i32> %x) {
%0:
  %mul = shl <2 x i32> %x, { 5, 5 }
  %cmp = icmp eq <2 x i32> %mul, { 0, 0 }
  ret <2 x i1> %cmp
}
=>
define <2 x i1> @icmp_shl_eq_vec(<2 x i32> %x) {
%0:
  %mul.mask = and <2 x i32> %x, { 134217727, 134217727 }
  %cmp = icmp eq <2 x i32> %mul.mask, { 0, 0 }
  ret <2 x i1> %cmp
}
Transformation seems to be correct!


----------------------------------------
define i1 @icmp_shl_nsw_ne(i32 %x) {
%0:
  %mul = shl nsw i32 %x, 7
  %cmp = icmp ne i32 %mul, 0
  ret i1 %cmp
}
=>
define i1 @icmp_shl_nsw_ne(i32 %x) {
%0:
  %cmp = icmp ne i32 %x, 0
  ret i1 %cmp
}
Transformation seems to be correct!


----------------------------------------
define <2 x i1> @icmp_shl_nsw_ne_vec(<2 x i32> %x) {
%0:
  %mul = shl nsw <2 x i32> %x, { 7, 7 }
  %cmp = icmp ne <2 x i32> %mul, { 0, 0 }
  ret <2 x i1> %cmp
}
=>
define <2 x i1> @icmp_shl_nsw_ne_vec(<2 x i32> %x) {
%0:
  %cmp = icmp ne <2 x i32> %x, { 0, 0 }
  ret <2 x i1> %cmp
}
Transformation seems to be correct!


----------------------------------------
define i1 @icmp_shl_ne(i32 %x) {
%0:
  %mul = shl i32 %x, 7
  %cmp = icmp ne i32 %mul, 0
  ret i1 %cmp
}
=>
define i1 @icmp_shl_ne(i32 %x) {
%0:
  %mul.mask = and i32 %x, 33554431
  %cmp = icmp ne i32 %mul.mask, 0
  ret i1 %cmp
}
Transformation seems to be correct!


----------------------------------------
define <2 x i1> @icmp_shl_ne_vec(<2 x i32> %x) {
%0:
  %mul = shl <2 x i32> %x, { 7, 7 }
  %cmp = icmp ne <2 x i32> %mul, { 0, 0 }
  ret <2 x i1> %cmp
}
=>
define <2 x i1> @icmp_shl_ne_vec(<2 x i32> %x) {
%0:
  %mul.mask = and <2 x i32> %x, { 33554431, 33554431 }
  %cmp = icmp ne <2 x i32> %mul.mask, { 0, 0 }
  ret <2 x i1> %cmp
}
Transformation seems to be correct!


----------------------------------------
define <2 x i1> @icmp_shl_nuw_ne_vec(<2 x i32> %x) {
%0:
  %shl = shl nuw <2 x i32> %x, { 7, 7 }
  %cmp = icmp ne <2 x i32> %shl, { 256, 256 }
  ret <2 x i1> %cmp
}
=>
define <2 x i1> @icmp_shl_nuw_ne_vec(<2 x i32> %x) {
%0:
  %cmp = icmp ne <2 x i32> %x, { 2, 2 }
  ret <2 x i1> %cmp
}
Transformation seems to be correct!


----------------------------------------
define i1 @icmp_mul_nsw(i32 %x) {
%0:
  %mul = mul nsw i32 %x, 12
  %cmp = icmp sgt i32 %mul, 0
  ret i1 %cmp
}
=>
define i1 @icmp_mul_nsw(i32 %x) {
%0:
  %cmp = icmp sgt i32 %x, 0
  ret i1 %cmp
}
Transformation seems to be correct!


----------------------------------------
define i1 @icmp_mul_nsw1(i32 %x) {
%0:
  %mul = mul nsw i32 %x, 12
  %cmp = icmp sle i32 %mul, 4294967295
  ret i1 %cmp
}
=>
define i1 @icmp_mul_nsw1(i32 %x) {
%0:
  %cmp = icmp slt i32 %x, 0
  ret i1 %cmp
}
Transformation seems to be correct!


----------------------------------------
define i1 @icmp_mul_nsw_neg(i32 %x) {
%0:
  %mul = mul nsw i32 %x, 4294967284
  %cmp = icmp sge i32 %mul, 0
  ret i1 %cmp
}
=>
define i1 @icmp_mul_nsw_neg(i32 %x) {
%0:
  %cmp = icmp slt i32 %x, 1
  ret i1 %cmp
}
Transformation seems to be correct!


----------------------------------------
define i1 @icmp_mul_nsw_neg1(i32 %x) {
%0:
  %mul = mul nsw i32 %x, 4294967284
  %cmp = icmp sge i32 %mul, 1
  ret i1 %cmp
}
=>
define i1 @icmp_mul_nsw_neg1(i32 %x) {
%0:
  %cmp = icmp slt i32 %x, 0
  ret i1 %cmp
}
Transformation seems to be correct!


----------------------------------------
define <2 x i1> @icmp_mul_nsw_neg1_vec(<2 x i32> %x) {
%0:
  %mul = mul nsw <2 x i32> %x, { 4294967284, 4294967284 }
  %cmp = icmp sge <2 x i32> %mul, { 1, 1 }
  ret <2 x i1> %cmp
}
=>
define <2 x i1> @icmp_mul_nsw_neg1_vec(<2 x i32> %x) {
%0:
  %cmp = icmp slt <2 x i32> %x, { 0, 0 }
  ret <2 x i1> %cmp
}
Transformation seems to be correct!


----------------------------------------
define i1 @icmp_mul_nsw_0(i32 %x) {
%0:
  %mul = mul nsw i32 %x, 0
  %cmp = icmp sgt i32 %mul, 0
  ret i1 %cmp
}
=>
define i1 @icmp_mul_nsw_0(i32 %x) {
%0:
  ret i1 0
}
Transformation seems to be correct!


----------------------------------------
define i1 @icmp_mul(i32 %x) {
%0:
  %mul = mul i32 %x, 4294967284
  %cmp = icmp sge i32 %mul, 0
  ret i1 %cmp
}
=>
define i1 @icmp_mul(i32 %x) {
%0:
  %mul = mul i32 %x, 4294967284
  %cmp = icmp sgt i32 %mul, 4294967295
  ret i1 %cmp
}
Transformation seems to be correct!


----------------------------------------
define i1 @icmp_mul_neq0(i32 %x) {
%0:
  %mul = mul nsw i32 %x, 4294967284
  %cmp = icmp ne i32 %mul, 0
  ret i1 %cmp
}
=>
define i1 @icmp_mul_neq0(i32 %x) {
%0:
  %cmp = icmp ne i32 %x, 0
  ret i1 %cmp
}
Transformation seems to be correct!


----------------------------------------
define <2 x i1> @icmp_mul_neq0_vec(<2 x i32> %x) {
%0:
  %mul = mul nsw <2 x i32> %x, { 4294967284, 4294967284 }
  %cmp = icmp ne <2 x i32> %mul, { 0, 0 }
  ret <2 x i1> %cmp
}
=>
define <2 x i1> @icmp_mul_neq0_vec(<2 x i32> %x) {
%0:
  %cmp = icmp ne <2 x i32> %x, { 0, 0 }
  ret <2 x i1> %cmp
}
Transformation seems to be correct!


----------------------------------------
define i1 @icmp_mul_eq0(i32 %x) {
%0:
  %mul = mul nsw i32 %x, 12
  %cmp = icmp eq i32 %mul, 0
  ret i1 %cmp
}
=>
define i1 @icmp_mul_eq0(i32 %x) {
%0:
  %cmp = icmp eq i32 %x, 0
  ret i1 %cmp
}
Transformation seems to be correct!


----------------------------------------
define i1 @icmp_mul0_eq0(i32 %x) {
%0:
  %mul = mul i32 %x, 0
  %cmp = icmp eq i32 %mul, 0
  ret i1 %cmp
}
=>
define i1 @icmp_mul0_eq0(i32 %x) {
%0:
  ret i1 1
}
Transformation seems to be correct!


----------------------------------------
define i1 @icmp_mul0_ne0(i32 %x) {
%0:
  %mul = mul i32 %x, 0
  %cmp = icmp ne i32 %mul, 0
  ret i1 %cmp
}
=>
define i1 @icmp_mul0_ne0(i32 %x) {
%0:
  ret i1 0
}
Transformation seems to be correct!


----------------------------------------
define i1 @icmp_sub1_sge(i32 %x, i32 %y) {
%0:
  %sub = add nsw i32 %x, 4294967295
  %cmp = icmp sge i32 %sub, %y
  ret i1 %cmp
}
=>
define i1 @icmp_sub1_sge(i32 %x, i32 %y) {
%0:
  %cmp = icmp sgt i32 %x, %y
  ret i1 %cmp
}
Transformation seems to be correct!


----------------------------------------
define i1 @icmp_add1_sgt(i32 %x, i32 %y) {
%0:
  %add = add nsw i32 %x, 1
  %cmp = icmp sgt i32 %add, %y
  ret i1 %cmp
}
=>
define i1 @icmp_add1_sgt(i32 %x, i32 %y) {
%0:
  %cmp = icmp sge i32 %x, %y
  ret i1 %cmp
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define i1 @icmp_sub1_slt(i32 %x, i32 %y) {
%0:
  %sub = add nsw i32 %x, 4294967295
  %cmp = icmp slt i32 %sub, %y
  ret i1 %cmp
}
=>
define i1 @icmp_sub1_slt(i32 %x, i32 %y) {
%0:
  %cmp = icmp sle i32 %x, %y
  ret i1 %cmp
}
Transformation seems to be correct!


----------------------------------------
define i1 @icmp_add1_sle(i32 %x, i32 %y) {
%0:
  %add = add nsw i32 %x, 1
  %cmp = icmp sle i32 %add, %y
  ret i1 %cmp
}
=>
define i1 @icmp_add1_sle(i32 %x, i32 %y) {
%0:
  %cmp = icmp slt i32 %x, %y
  ret i1 %cmp
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define i1 @icmp_add20_sge_add57(i32 %x, i32 %y) {
%0:
  %1 = add nsw i32 %x, 20
  %2 = add nsw i32 %y, 57
  %cmp = icmp sge i32 %1, %2
  ret i1 %cmp
}
=>
define i1 @icmp_add20_sge_add57(i32 %x, i32 %y) {
%0:
  %1 = add nsw i32 %y, 37
  %cmp = icmp sle i32 %1, %x
  ret i1 %cmp
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define i1 @icmp_sub57_sge_sub20(i32 %x, i32 %y) {
%0:
  %1 = add nsw i32 %x, 4294967239
  %2 = add nsw i32 %y, 4294967276
  %cmp = icmp sge i32 %1, %2
  ret i1 %cmp
}
=>
define i1 @icmp_sub57_sge_sub20(i32 %x, i32 %y) {
%0:
  %1 = add nsw i32 %x, 4294967259
  %cmp = icmp sge i32 %1, %y
  ret i1 %cmp
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define i1 @icmp_and_shl_neg_ne_0(i32 %A, i32 %B) {
%0:
  %neg = xor i32 %A, 4294967295
  %shl = shl i32 1, %B
  %and = and i32 %shl, %neg
  %cmp = icmp ne i32 %and, 0
  ret i1 %cmp
}
=>
define i1 @icmp_and_shl_neg_ne_0(i32 %A, i32 %B) {
%0:
  %shl = shl i32 1, %B
  %1 = and i32 %shl, %A
  %cmp = icmp eq i32 %1, 0
  ret i1 %cmp
}
Transformation seems to be correct!


----------------------------------------
define i1 @icmp_and_shl_neg_eq_0(i32 %A, i32 %B) {
%0:
  %neg = xor i32 %A, 4294967295
  %shl = shl i32 1, %B
  %and = and i32 %shl, %neg
  %cmp = icmp eq i32 %and, 0
  ret i1 %cmp
}
=>
define i1 @icmp_and_shl_neg_eq_0(i32 %A, i32 %B) {
%0:
  %shl = shl i32 1, %B
  %1 = and i32 %shl, %A
  %cmp = icmp ne i32 %1, 0
  ret i1 %cmp
}
Transformation seems to be correct!


----------------------------------------
define i1 @icmp_add_and_shr_ne_0(i32 %X) {
%0:
  %shr = lshr i32 %X, 4
  %and = and i32 %shr, 15
  %add = add i32 %and, 4294967282
  %tobool = icmp ne i32 %add, 0
  ret i1 %tobool
}
=>
define i1 @icmp_add_and_shr_ne_0(i32 %X) {
%0:
  %1 = and i32 %X, 240
  %tobool = icmp ne i32 %1, 224
  ret i1 %tobool
}
Transformation seems to be correct!


----------------------------------------
define <2 x i1> @icmp_add_and_shr_ne_0_vec(<2 x i32> %X) {
%0:
  %shr = lshr <2 x i32> %X, { 4, 4 }
  %and = and <2 x i32> %shr, { 15, 15 }
  %add = add <2 x i32> %and, { 4294967282, 4294967282 }
  %tobool = icmp ne <2 x i32> %add, { 0, 0 }
  ret <2 x i1> %tobool
}
=>
define <2 x i1> @icmp_add_and_shr_ne_0_vec(<2 x i32> %X) {
%0:
  %1 = and <2 x i32> %X, { 240, 240 }
  %tobool = icmp ne <2 x i32> %1, { 224, 224 }
  ret <2 x i1> %tobool
}
Transformation seems to be correct!


----------------------------------------
define i1 @icmp_and_shr_multiuse(i32 %X) {
%0:
  %shr = lshr i32 %X, 4
  %and = and i32 %shr, 15
  %and2 = and i32 %shr, 31
  %tobool = icmp ne i32 %and, 14
  %tobool2 = icmp ne i32 %and2, 27
  %and3 = and i1 %tobool, %tobool2
  ret i1 %and3
}
=>
define i1 @icmp_and_shr_multiuse(i32 %X) {
%0:
  %1 = and i32 %X, 240
  %tobool = icmp ne i32 %1, 224
  %2 = and i32 %X, 496
  %tobool2 = icmp ne i32 %2, 432
  %and3 = and i1 %tobool, %tobool2
  ret i1 %and3
}
Transformation seems to be correct!


----------------------------------------
define i1 @icmp_and_shr_multiuse_logical(i32 %X) {
%0:
  %shr = lshr i32 %X, 4
  %and = and i32 %shr, 15
  %and2 = and i32 %shr, 31
  %tobool = icmp ne i32 %and, 14
  %tobool2 = icmp ne i32 %and2, 27
  %and3 = select i1 %tobool, i1 %tobool2, i1 0
  ret i1 %and3
}
=>
define i1 @icmp_and_shr_multiuse_logical(i32 %X) {
%0:
  %1 = and i32 %X, 240
  %tobool = icmp ne i32 %1, 224
  %2 = and i32 %X, 496
  %tobool2 = icmp ne i32 %2, 432
  %and3 = and i1 %tobool, %tobool2
  ret i1 %and3
}
Transformation seems to be correct!


----------------------------------------
define i1 @icmp_and_ashr_multiuse(i32 %X) {
%0:
  %shr = ashr i32 %X, 4
  %and = and i32 %shr, 15
  %and2 = and i32 %shr, 31
  %tobool = icmp ne i32 %and, 14
  %tobool2 = icmp ne i32 %and2, 27
  %and3 = and i1 %tobool, %tobool2
  ret i1 %and3
}
=>
define i1 @icmp_and_ashr_multiuse(i32 %X) {
%0:
  %1 = and i32 %X, 240
  %tobool = icmp ne i32 %1, 224
  %2 = and i32 %X, 496
  %tobool2 = icmp ne i32 %2, 432
  %and3 = and i1 %tobool, %tobool2
  ret i1 %and3
}
Transformation seems to be correct!


----------------------------------------
define i1 @icmp_and_ashr_multiuse_logical(i32 %X) {
%0:
  %shr = ashr i32 %X, 4
  %and = and i32 %shr, 15
  %and2 = and i32 %shr, 31
  %tobool = icmp ne i32 %and, 14
  %tobool2 = icmp ne i32 %and2, 27
  %and3 = select i1 %tobool, i1 %tobool2, i1 0
  ret i1 %and3
}
=>
define i1 @icmp_and_ashr_multiuse_logical(i32 %X) {
%0:
  %1 = and i32 %X, 240
  %tobool = icmp ne i32 %1, 224
  %2 = and i32 %X, 496
  %tobool2 = icmp ne i32 %2, 432
  %and3 = and i1 %tobool, %tobool2
  ret i1 %and3
}
Transformation seems to be correct!


----------------------------------------
define i1 @icmp_lshr_and_overshift(i8 %X) {
%0:
  %shr = lshr i8 %X, 5
  %and = and i8 %shr, 15
  %tobool = icmp ne i8 %and, 0
  ret i1 %tobool
}
=>
define i1 @icmp_lshr_and_overshift(i8 %X) {
%0:
  %tobool = icmp ugt i8 %X, 31
  ret i1 %tobool
}
Transformation seems to be correct!


----------------------------------------
define i1 @icmp_ashr_and_overshift(i8 %X) {
%0:
  %shr = ashr i8 %X, 5
  %and = and i8 %shr, 15
  %tobool = icmp ne i8 %and, 0
  ret i1 %tobool
}
=>
define i1 @icmp_ashr_and_overshift(i8 %X) {
%0:
  %shr = ashr i8 %X, 5
  %and = and i8 %shr, 15
  %tobool = icmp ne i8 %and, 0
  ret i1 %tobool
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
define i1 @icmp_and_ashr_neg_and_legal(i8 %x) {
%0:
  %ashr = ashr i8 %x, 4
  %and = and i8 %ashr, 254
  %cmp = icmp slt i8 %and, 1
  ret i1 %cmp
}
=>
define i1 @icmp_and_ashr_neg_and_legal(i8 %x) {
%0:
  %1 = and i8 %x, 224
  %cmp = icmp slt i8 %1, 16
  ret i1 %cmp
}
Transformation seems to be correct!


----------------------------------------
define i1 @icmp_and_ashr_mixed_and_shiftout(i8 %x) {
%0:
  %ashr = ashr i8 %x, 4
  %and = and i8 %ashr, 31
  %cmp = icmp ugt i8 %and, 8
  ret i1 %cmp
}
=>
define i1 @icmp_and_ashr_mixed_and_shiftout(i8 %x) {
%0:
  %ashr = ashr i8 %x, 4
  %and = and i8 %ashr, 31
  %cmp = icmp ugt i8 %and, 8
  ret i1 %cmp
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
define i1 @icmp_and_ashr_neg_cmp_slt_legal(i8 %x) {
%0:
  %ashr = ashr i8 %x, 4
  %and = and i8 %ashr, 254
  %cmp = icmp slt i8 %and, 252
  ret i1 %cmp
}
=>
define i1 @icmp_and_ashr_neg_cmp_slt_legal(i8 %x) {
%0:
  %1 = and i8 %x, 224
  %cmp = icmp slt i8 %1, 192
  ret i1 %cmp
}
Transformation seems to be correct!


----------------------------------------
define i1 @icmp_and_ashr_neg_cmp_slt_shiftout(i8 %x) {
%0:
  %ashr = ashr i8 %x, 4
  %and = and i8 %ashr, 254
  %cmp = icmp slt i8 %and, 188
  ret i1 %cmp
}
=>
define i1 @icmp_and_ashr_neg_cmp_slt_shiftout(i8 %x) {
%0:
  %ashr = ashr i8 %x, 4
  %and = and i8 %ashr, 254
  %cmp = icmp slt i8 %and, 188
  ret i1 %cmp
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
define i1 @icmp_and_ashr_neg_cmp_eq_legal(i8 %x) {
%0:
  %ashr = ashr i8 %x, 4
  %and = and i8 %ashr, 254
  %cmp = icmp eq i8 %and, 252
  ret i1 %cmp
}
=>
define i1 @icmp_and_ashr_neg_cmp_eq_legal(i8 %x) {
%0:
  %1 = and i8 %x, 224
  %cmp = icmp eq i8 %1, 192
  ret i1 %cmp
}
Transformation seems to be correct!


----------------------------------------
define i1 @icmp_and_ashr_neg_cmp_eq_shiftout(i8 %x) {
%0:
  %ashr = ashr i8 %x, 4
  %and = and i8 %ashr, 254
  %cmp = icmp eq i8 %and, 188
  ret i1 %cmp
}
=>
define i1 @icmp_and_ashr_neg_cmp_eq_shiftout(i8 %x) {
%0:
  ret i1 0
}
Transformation seems to be correct!


----------------------------------------
define i1 @icmp_and_ashr_neg_cmp_ne_shiftout(i8 %x) {
%0:
  %ashr = ashr i8 %x, 4
  %and = and i8 %ashr, 254
  %cmp = icmp ne i8 %and, 188
  ret i1 %cmp
}
=>
define i1 @icmp_and_ashr_neg_cmp_ne_shiftout(i8 %x) {
%0:
  ret i1 1
}
Transformation seems to be correct!


----------------------------------------
define i1 @test71(* %x) {
%0:
  %a = gep * %x, 1 x i64 8
  %b = gep inbounds * %x, 1 x i64 8
  %c = icmp ugt * %a, %b
  ret i1 %c
}
=>
define i1 @test71(* %x) {
%0:
  ret i1 0
}
Transformation seems to be correct!


----------------------------------------
define i1 @icmp_shl_1_V_ult_32(i32 %V) {
%0:
  %shl = shl i32 1, %V
  %cmp = icmp ult i32 %shl, 32
  ret i1 %cmp
}
=>
define i1 @icmp_shl_1_V_ult_32(i32 %V) {
%0:
  %cmp = icmp ult i32 %V, 5
  ret i1 %cmp
}
Transformation seems to be correct!


----------------------------------------
define <2 x i1> @icmp_shl_1_V_ult_32_vec(<2 x i32> %V) {
%0:
  %shl = shl <2 x i32> { 1, 1 }, %V
  %cmp = icmp ult <2 x i32> %shl, { 32, 32 }
  ret <2 x i1> %cmp
}
=>
define <2 x i1> @icmp_shl_1_V_ult_32_vec(<2 x i32> %V) {
%0:
  %cmp = icmp ult <2 x i32> %V, { 5, 5 }
  ret <2 x i1> %cmp
}
Transformation seems to be correct!


----------------------------------------
define i1 @icmp_shl_1_V_eq_32(i32 %V) {
%0:
  %shl = shl i32 1, %V
  %cmp = icmp eq i32 %shl, 32
  ret i1 %cmp
}
=>
define i1 @icmp_shl_1_V_eq_32(i32 %V) {
%0:
  %cmp = icmp eq i32 %V, 5
  ret i1 %cmp
}
Transformation seems to be correct!


----------------------------------------
define <2 x i1> @icmp_shl_1_V_eq_32_vec(<2 x i32> %V) {
%0:
  %shl = shl <2 x i32> { 1, 1 }, %V
  %cmp = icmp eq <2 x i32> %shl, { 32, 32 }
  ret <2 x i1> %cmp
}
=>
define <2 x i1> @icmp_shl_1_V_eq_32_vec(<2 x i32> %V) {
%0:
  %cmp = icmp eq <2 x i32> %V, { 5, 5 }
  ret <2 x i1> %cmp
}
Transformation seems to be correct!


----------------------------------------
define i1 @icmp_shl_1_V_ult_30(i32 %V) {
%0:
  %shl = shl i32 1, %V
  %cmp = icmp ult i32 %shl, 30
  ret i1 %cmp
}
=>
define i1 @icmp_shl_1_V_ult_30(i32 %V) {
%0:
  %cmp = icmp ult i32 %V, 5
  ret i1 %cmp
}
Transformation seems to be correct!


----------------------------------------
define <2 x i1> @icmp_shl_1_V_ult_30_vec(<2 x i32> %V) {
%0:
  %shl = shl <2 x i32> { 1, 1 }, %V
  %cmp = icmp ult <2 x i32> %shl, { 30, 30 }
  ret <2 x i1> %cmp
}
=>
define <2 x i1> @icmp_shl_1_V_ult_30_vec(<2 x i32> %V) {
%0:
  %cmp = icmp ult <2 x i32> %V, { 5, 5 }
  ret <2 x i1> %cmp
}
Transformation seems to be correct!


----------------------------------------
define i1 @icmp_shl_1_V_ugt_30(i32 %V) {
%0:
  %shl = shl i32 1, %V
  %cmp = icmp ugt i32 %shl, 30
  ret i1 %cmp
}
=>
define i1 @icmp_shl_1_V_ugt_30(i32 %V) {
%0:
  %cmp = icmp ugt i32 %V, 4
  ret i1 %cmp
}
Transformation seems to be correct!


----------------------------------------
define <2 x i1> @icmp_shl_1_V_ugt_30_vec(<2 x i32> %V) {
%0:
  %shl = shl <2 x i32> { 1, 1 }, %V
  %cmp = icmp ugt <2 x i32> %shl, { 30, 30 }
  ret <2 x i1> %cmp
}
=>
define <2 x i1> @icmp_shl_1_V_ugt_30_vec(<2 x i32> %V) {
%0:
  %cmp = icmp ugt <2 x i32> %V, { 4, 4 }
  ret <2 x i1> %cmp
}
Transformation seems to be correct!


----------------------------------------
define i1 @icmp_shl_1_V_ule_30(i32 %V) {
%0:
  %shl = shl i32 1, %V
  %cmp = icmp ule i32 %shl, 30
  ret i1 %cmp
}
=>
define i1 @icmp_shl_1_V_ule_30(i32 %V) {
%0:
  %cmp = icmp ult i32 %V, 5
  ret i1 %cmp
}
Transformation seems to be correct!


----------------------------------------
define <2 x i1> @icmp_shl_1_V_ule_30_vec(<2 x i32> %V) {
%0:
  %shl = shl <2 x i32> { 1, 1 }, %V
  %cmp = icmp ule <2 x i32> %shl, { 30, 30 }
  ret <2 x i1> %cmp
}
=>
define <2 x i1> @icmp_shl_1_V_ule_30_vec(<2 x i32> %V) {
%0:
  %cmp = icmp ult <2 x i32> %V, { 5, 5 }
  ret <2 x i1> %cmp
}
Transformation seems to be correct!


----------------------------------------
define i1 @icmp_shl_1_V_uge_30(i32 %V) {
%0:
  %shl = shl i32 1, %V
  %cmp = icmp uge i32 %shl, 30
  ret i1 %cmp
}
=>
define i1 @icmp_shl_1_V_uge_30(i32 %V) {
%0:
  %cmp = icmp ugt i32 %V, 4
  ret i1 %cmp
}
Transformation seems to be correct!


----------------------------------------
define <2 x i1> @icmp_shl_1_V_uge_30_vec(<2 x i32> %V) {
%0:
  %shl = shl <2 x i32> { 1, 1 }, %V
  %cmp = icmp uge <2 x i32> %shl, { 30, 30 }
  ret <2 x i1> %cmp
}
=>
define <2 x i1> @icmp_shl_1_V_uge_30_vec(<2 x i32> %V) {
%0:
  %cmp = icmp ugt <2 x i32> %V, { 4, 4 }
  ret <2 x i1> %cmp
}
Transformation seems to be correct!


----------------------------------------
define i1 @icmp_shl_1_V_uge_2147483648(i32 %V) {
%0:
  %shl = shl i32 1, %V
  %cmp = icmp uge i32 %shl, 2147483648
  ret i1 %cmp
}
=>
define i1 @icmp_shl_1_V_uge_2147483648(i32 %V) {
%0:
  %cmp = icmp eq i32 %V, 31
  ret i1 %cmp
}
Transformation seems to be correct!


----------------------------------------
define <2 x i1> @icmp_shl_1_V_uge_2147483648_vec(<2 x i32> %V) {
%0:
  %shl = shl <2 x i32> { 1, 1 }, %V
  %cmp = icmp uge <2 x i32> %shl, { 2147483648, 2147483648 }
  ret <2 x i1> %cmp
}
=>
define <2 x i1> @icmp_shl_1_V_uge_2147483648_vec(<2 x i32> %V) {
%0:
  %cmp = icmp eq <2 x i32> %V, { 31, 31 }
  ret <2 x i1> %cmp
}
Transformation seems to be correct!


----------------------------------------
define i1 @icmp_shl_1_V_ult_2147483648(i32 %V) {
%0:
  %shl = shl i32 1, %V
  %cmp = icmp ult i32 %shl, 2147483648
  ret i1 %cmp
}
=>
define i1 @icmp_shl_1_V_ult_2147483648(i32 %V) {
%0:
  %cmp = icmp ne i32 %V, 31
  ret i1 %cmp
}
Transformation seems to be correct!


----------------------------------------
define <2 x i1> @icmp_shl_1_V_ult_2147483648_vec(<2 x i32> %V) {
%0:
  %shl = shl <2 x i32> { 1, 1 }, %V
  %cmp = icmp ult <2 x i32> %shl, { 2147483648, 2147483648 }
  ret <2 x i1> %cmp
}
=>
define <2 x i1> @icmp_shl_1_V_ult_2147483648_vec(<2 x i32> %V) {
%0:
  %cmp = icmp ne <2 x i32> %V, { 31, 31 }
  ret <2 x i1> %cmp
}
Transformation seems to be correct!


----------------------------------------
define i1 @or_icmp_eq_B_0_icmp_ult_A_B(i64 %a, i64 %b) {
%0:
  %1 = icmp eq i64 %b, 0
  %2 = icmp ult i64 %a, %b
  %3 = or i1 %1, %2
  ret i1 %3
}
=>
define i1 @or_icmp_eq_B_0_icmp_ult_A_B(i64 %a, i64 %b) {
%0:
  %1 = add i64 %b, -1
  %2 = icmp uge i64 %1, %a
  ret i1 %2
}
Transformation seems to be correct!


----------------------------------------
define i1 @or_icmp_eq_B_0_icmp_ult_A_B_logical(i64 %a, i64 %b) {
%0:
  %1 = icmp eq i64 %b, 0
  %2 = icmp ult i64 %a, %b
  %3 = select i1 %1, i1 1, i1 %2
  ret i1 %3
}
=>
define i1 @or_icmp_eq_B_0_icmp_ult_A_B_logical(i64 %a, i64 %b) {
%0:
  %1 = add i64 %b, -1
  %2 = icmp uge i64 %1, %a
  ret i1 %2
}
Transformation doesn't verify!
ERROR: Target is more poisonous than source

Example:
i64 %a = poison
i64 %b = #x0000000000000000 (0)

Source:
i1 %1 = #x1 (1)
i1 %2 = poison
i1 %3 = #x1 (1)

Target:
i64 %1 = #xffffffffffffffff (18446744073709551615, -1)
i1 %2 = poison
Source value: #x1 (1)
Target value: poison


------------------- SMT STATS -------------------
Num queries: 582
Num invalid: 0
Num skips:   0
Num trivial: 622 (51.7%)
Num timeout: 20 (3.4%)
Num errors:  0 (0.0%)
Num SAT:     178 (30.6%)
Num UNSAT:   384 (66.0%)
Alive2: Transform doesn't verify; aborting!

stderr:

+ : 'RUN: at line 2'
+ /home/nlopes/alive2/build/opt-alive.sh -instcombine -S
+ /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/InstCombine/icmp.ll

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

 

<-- Back