Test Failure: Transforms/InstCombine/and.ll

Test source: git

Log:

Source: <stdin>

----------------------------------------
define i32 @test1(i32 %A) {
%0:
  %B = and i32 %A, 0
  ret i32 %B
}
=>
define i32 @test1(i32 %A) {
%0:
  ret i32 0
}
Transformation seems to be correct!


----------------------------------------
define i32 @test2(i32 %A) {
%0:
  %B = and i32 %A, 4294967295
  ret i32 %B
}
=>
define i32 @test2(i32 %A) {
%0:
  ret i32 %A
}
Transformation seems to be correct!


----------------------------------------
define i1 @test3(i1 %A) {
%0:
  %B = and i1 %A, 0
  ret i1 %B
}
=>
define i1 @test3(i1 %A) {
%0:
  ret i1 0
}
Transformation seems to be correct!


----------------------------------------
define i1 @test3_logical(i1 %A) {
%0:
  %B = select i1 %A, i1 0, i1 0
  ret i1 %B
}
=>
define i1 @test3_logical(i1 %A) {
%0:
  ret i1 0
}
Transformation seems to be correct!


----------------------------------------
define i1 @test4(i1 %A) {
%0:
  %B = and i1 %A, 1
  ret i1 %B
}
=>
define i1 @test4(i1 %A) {
%0:
  ret i1 %A
}
Transformation seems to be correct!


----------------------------------------
define i1 @test4_logical(i1 %A) {
%0:
  %B = select i1 %A, i1 1, i1 0
  ret i1 %B
}
=>
define i1 @test4_logical(i1 %A) {
%0:
  ret i1 %A
}
Transformation seems to be correct!


----------------------------------------
define i32 @test5(i32 %A) {
%0:
  %B = and i32 %A, %A
  ret i32 %B
}
=>
define i32 @test5(i32 %A) {
%0:
  ret i32 %A
}
Transformation seems to be correct!


----------------------------------------
define i1 @test6(i1 %A) {
%0:
  %B = and i1 %A, %A
  ret i1 %B
}
=>
define i1 @test6(i1 %A) {
%0:
  ret i1 %A
}
Transformation seems to be correct!


----------------------------------------
define i1 @test6_logical(i1 %A) {
%0:
  %B = select i1 %A, i1 %A, i1 0
  ret i1 %B
}
=>
define i1 @test6_logical(i1 %A) {
%0:
  ret i1 %A
}
Transformation seems to be correct!


----------------------------------------
define i32 @test7(i32 %A) {
%0:
  %NotA = xor i32 %A, 4294967295
  %B = and i32 %A, %NotA
  ret i32 %B
}
=>
define i32 @test7(i32 %A) {
%0:
  ret i32 0
}
Transformation seems to be correct!


----------------------------------------
define i8 @test8(i8 %A) {
%0:
  %B = and i8 %A, 3
  %C = and i8 %B, 4
  ret i8 %C
}
=>
define i8 @test8(i8 %A) {
%0:
  ret i8 0
}
Transformation seems to be correct!


----------------------------------------
define i1 @test9(i32 %A) {
%0:
  %B = and i32 %A, 2147483648
  %C = icmp ne i32 %B, 0
  ret i1 %C
}
=>
define i1 @test9(i32 %A) {
%0:
  %C = icmp slt i32 %A, 0
  ret i1 %C
}
Transformation seems to be correct!


----------------------------------------
define i1 @test9a(i32 %A) {
%0:
  %B = and i32 %A, 2147483648
  %C = icmp ne i32 %B, 0
  ret i1 %C
}
=>
define i1 @test9a(i32 %A) {
%0:
  %C = icmp slt i32 %A, 0
  ret i1 %C
}
Transformation seems to be correct!


----------------------------------------
define i32 @test10(i32 %A) {
%0:
  %B = and i32 %A, 12
  %C = xor i32 %B, 15
  %D = and i32 %C, 1
  ret i32 %D
}
=>
define i32 @test10(i32 %A) {
%0:
  ret i32 1
}
Transformation seems to be correct!


----------------------------------------
define i32 @test11(i32 %A, * %P) {
%0:
  %B = or i32 %A, 3
  %C = xor i32 %B, 12
  store i32 %C, * %P, align 4
  %D = and i32 %C, 3
  ret i32 %D
}
=>
define i32 @test11(i32 %A, * %P) {
%0:
  %B = or i32 %A, 3
  %C = xor i32 %B, 12
  store i32 %C, * %P, align 4
  ret i32 3
}
Transformation seems to be correct!


----------------------------------------
define i1 @test12(i32 %A, i32 %B) {
%0:
  %C1 = icmp ult i32 %A, %B
  %C2 = icmp ule i32 %A, %B
  %D = and i1 %C1, %C2
  ret i1 %D
}
=>
define i1 @test12(i32 %A, i32 %B) {
%0:
  %C1 = icmp ult i32 %A, %B
  ret i1 %C1
}
Transformation seems to be correct!


----------------------------------------
define i1 @test12_logical(i32 %A, i32 %B) {
%0:
  %C1 = icmp ult i32 %A, %B
  %C2 = icmp ule i32 %A, %B
  %D = select i1 %C1, i1 %C2, i1 0
  ret i1 %D
}
=>
define i1 @test12_logical(i32 %A, i32 %B) {
%0:
  %C1 = icmp ult i32 %A, %B
  ret i1 %C1
}
Transformation seems to be correct!


----------------------------------------
define i1 @test13(i32 %A, i32 %B) {
%0:
  %C1 = icmp ult i32 %A, %B
  %C2 = icmp ugt i32 %A, %B
  %D = and i1 %C1, %C2
  ret i1 %D
}
=>
define i1 @test13(i32 %A, i32 %B) {
%0:
  ret i1 0
}
Transformation seems to be correct!


----------------------------------------
define i1 @test13_logical(i32 %A, i32 %B) {
%0:
  %C1 = icmp ult i32 %A, %B
  %C2 = icmp ugt i32 %A, %B
  %D = select i1 %C1, i1 %C2, i1 0
  ret i1 %D
}
=>
define i1 @test13_logical(i32 %A, i32 %B) {
%0:
  ret i1 0
}
Transformation seems to be correct!


----------------------------------------
define i1 @test14(i8 %A) {
%0:
  %B = and i8 %A, 128
  %C = icmp ne i8 %B, 0
  ret i1 %C
}
=>
define i1 @test14(i8 %A) {
%0:
  %C = icmp slt i8 %A, 0
  ret i1 %C
}
Transformation seems to be correct!


----------------------------------------
define i8 @test15(i8 %A) {
%0:
  %B = lshr i8 %A, 7
  %C = and i8 %B, 2
  ret i8 %C
}
=>
define i8 @test15(i8 %A) {
%0:
  ret i8 0
}
Transformation seems to be correct!


----------------------------------------
define i8 @test16(i8 %A) {
%0:
  %B = shl i8 %A, 2
  %C = and i8 %B, 3
  ret i8 %C
}
=>
define i8 @test16(i8 %A) {
%0:
  ret i8 0
}
Transformation seems to be correct!


----------------------------------------
define i1 @test18(i32 %A) {
%0:
  %B = and i32 %A, 4294967168
  %C = icmp ne i32 %B, 0
  ret i1 %C
}
=>
define i1 @test18(i32 %A) {
%0:
  %C = icmp ugt i32 %A, 127
  ret i1 %C
}
Transformation seems to be correct!


----------------------------------------
define <2 x i1> @test18_vec(<2 x i32> %A) {
%0:
  %B = and <2 x i32> %A, { 4294967168, 4294967168 }
  %C = icmp ne <2 x i32> %B, { 0, 0 }
  ret <2 x i1> %C
}
=>
define <2 x i1> @test18_vec(<2 x i32> %A) {
%0:
  %C = icmp ugt <2 x i32> %A, { 127, 127 }
  ret <2 x i1> %C
}
Transformation seems to be correct!


----------------------------------------
define i1 @test18a(i8 %A) {
%0:
  %B = and i8 %A, 254
  %C = icmp eq i8 %B, 0
  ret i1 %C
}
=>
define i1 @test18a(i8 %A) {
%0:
  %C = icmp ult i8 %A, 2
  ret i1 %C
}
Transformation seems to be correct!


----------------------------------------
define <2 x i1> @test18a_vec(<2 x i8> %A) {
%0:
  %B = and <2 x i8> %A, { 254, 254 }
  %C = icmp eq <2 x i8> %B, { 0, 0 }
  ret <2 x i1> %C
}
=>
define <2 x i1> @test18a_vec(<2 x i8> %A) {
%0:
  %C = icmp ult <2 x i8> %A, { 2, 2 }
  ret <2 x i1> %C
}
Transformation seems to be correct!


----------------------------------------
define i32 @test19(i32 %A) {
%0:
  %B = shl i32 %A, 3
  %C = and i32 %B, 4294967294
  ret i32 %C
}
=>
define i32 @test19(i32 %A) {
%0:
  %B = shl i32 %A, 3
  ret i32 %B
}
Transformation seems to be correct!


----------------------------------------
define i8 @test20(i8 %A) {
%0:
  %C = lshr i8 %A, 7
  %D = and i8 %C, 1
  ret i8 %D
}
=>
define i8 @test20(i8 %A) {
%0:
  %C = lshr i8 %A, 7
  ret i8 %C
}
Transformation seems to be correct!


----------------------------------------
define i1 @test23(i32 %A) {
%0:
  %B = icmp sgt i32 %A, 1
  %C = icmp sle i32 %A, 2
  %D = and i1 %B, %C
  ret i1 %D
}
=>
define i1 @test23(i32 %A) {
%0:
  %1 = icmp eq i32 %A, 2
  ret i1 %1
}
Transformation seems to be correct!


----------------------------------------
define i1 @test23_logical(i32 %A) {
%0:
  %B = icmp sgt i32 %A, 1
  %C = icmp sle i32 %A, 2
  %D = select i1 %B, i1 %C, i1 0
  ret i1 %D
}
=>
define i1 @test23_logical(i32 %A) {
%0:
  %1 = icmp eq i32 %A, 2
  ret i1 %1
}
Transformation seems to be correct!


----------------------------------------
define <2 x i1> @test23vec(<2 x i32> %A) {
%0:
  %B = icmp sgt <2 x i32> %A, { 1, 1 }
  %C = icmp sle <2 x i32> %A, { 2, 2 }
  %D = and <2 x i1> %B, %C
  ret <2 x i1> %D
}
=>
define <2 x i1> @test23vec(<2 x i32> %A) {
%0:
  %B = icmp sgt <2 x i32> %A, { 1, 1 }
  %C = icmp slt <2 x i32> %A, { 3, 3 }
  %D = and <2 x i1> %B, %C
  ret <2 x i1> %D
}
Transformation seems to be correct!


----------------------------------------
define i1 @test24(i32 %A) {
%0:
  %B = icmp sgt i32 %A, 1
  %C = icmp ne i32 %A, 2
  %D = and i1 %B, %C
  ret i1 %D
}
=>
define i1 @test24(i32 %A) {
%0:
  %1 = icmp sgt i32 %A, 2
  ret i1 %1
}
Transformation seems to be correct!


----------------------------------------
define i1 @test24_logical(i32 %A) {
%0:
  %B = icmp sgt i32 %A, 1
  %C = icmp ne i32 %A, 2
  %D = select i1 %B, i1 %C, i1 0
  ret i1 %D
}
=>
define i1 @test24_logical(i32 %A) {
%0:
  %1 = icmp sgt i32 %A, 2
  ret i1 %1
}
Transformation seems to be correct!


----------------------------------------
define i1 @test25(i32 %A) {
%0:
  %B = icmp sge i32 %A, 50
  %C = icmp slt i32 %A, 100
  %D = and i1 %B, %C
  ret i1 %D
}
=>
define i1 @test25(i32 %A) {
%0:
  %A.off = add i32 %A, 4294967246
  %1 = icmp ult i32 %A.off, 50
  ret i1 %1
}
Transformation seems to be correct!


----------------------------------------
define i1 @test25_logical(i32 %A) {
%0:
  %B = icmp sge i32 %A, 50
  %C = icmp slt i32 %A, 100
  %D = select i1 %B, i1 %C, i1 0
  ret i1 %D
}
=>
define i1 @test25_logical(i32 %A) {
%0:
  %A.off = add i32 %A, 4294967246
  %1 = icmp ult i32 %A.off, 50
  ret i1 %1
}
Transformation seems to be correct!


----------------------------------------
define <2 x i1> @test25vec(<2 x i32> %A) {
%0:
  %B = icmp sge <2 x i32> %A, { 50, 50 }
  %C = icmp slt <2 x i32> %A, { 100, 100 }
  %D = and <2 x i1> %B, %C
  ret <2 x i1> %D
}
=>
define <2 x i1> @test25vec(<2 x i32> %A) {
%0:
  %B = icmp sgt <2 x i32> %A, { 49, 49 }
  %C = icmp slt <2 x i32> %A, { 100, 100 }
  %D = and <2 x i1> %B, %C
  ret <2 x i1> %D
}
Transformation seems to be correct!


----------------------------------------
define i8 @test27(i8 %A) {
%0:
  %B = and i8 %A, 4
  %C = sub i8 %B, 16
  %D = and i8 %C, 240
  %E = add i8 %D, 16
  ret i8 %E
}
=>
define i8 @test27(i8 %A) {
%0:
  ret i8 0
}
Transformation seems to be correct!


----------------------------------------
define i32 @test28(i32 %X) {
%0:
  %Y = ashr i32 %X, 24
  %Z = and i32 %Y, 255
  ret i32 %Z
}
=>
define i32 @test28(i32 %X) {
%0:
  %1 = lshr i32 %X, 24
  ret i32 %1
}
Transformation seems to be correct!


----------------------------------------
define i32 @test29(i8 %X) {
%0:
  %Y = zext i8 %X to i32
  %Z = and i32 %Y, 255
  ret i32 %Z
}
=>
define i32 @test29(i8 %X) {
%0:
  %Y = zext i8 %X to i32
  ret i32 %Y
}
Transformation seems to be correct!


----------------------------------------
define i32 @test30(i1 %X) {
%0:
  %Y = zext i1 %X to i32
  %Z = and i32 %Y, 1
  ret i32 %Z
}
=>
define i32 @test30(i1 %X) {
%0:
  %Y = zext i1 %X to i32
  ret i32 %Y
}
Transformation seems to be correct!


----------------------------------------
define i32 @test31(i1 %X) {
%0:
  %Y = zext i1 %X to i32
  %Z = shl i32 %Y, 4
  %A = and i32 %Z, 16
  ret i32 %A
}
=>
define i32 @test31(i1 %X) {
%0:
  %Z = select i1 %X, i32 16, i32 0
  ret i32 %Z
}
Transformation seems to be correct!


----------------------------------------
define <2 x i32> @and_demanded_bits_splat_vec(<2 x i32> %x) {
%0:
  %y = add <2 x i32> %x, { 8, 8 }
  %z = and <2 x i32> %y, { 7, 7 }
  ret <2 x i32> %z
}
=>
define <2 x i32> @and_demanded_bits_splat_vec(<2 x i32> %x) {
%0:
  %z = and <2 x i32> %x, { 7, 7 }
  ret <2 x i32> %z
}
Transformation seems to be correct!


----------------------------------------
define i32 @and_zext_demanded(i16 %x, i32 %y) {
%0:
  %s = lshr i16 %x, 8
  %z = zext i16 %s to i32
  %o = or i32 %y, 255
  %a = and i32 %o, %z
  ret i32 %a
}
=>
define i32 @and_zext_demanded(i16 %x, i32 %y) {
%0:
  %s = lshr i16 %x, 8
  %z = zext i16 %s to i32
  ret i32 %z
}
Transformation seems to be correct!


----------------------------------------
define i32 @test32(i32 %In) {
%0:
  %Y = and i32 %In, 16
  %Z = lshr i32 %Y, 2
  %A = and i32 %Z, 1
  ret i32 %A
}
=>
define i32 @test32(i32 %In) {
%0:
  ret i32 0
}
Transformation seems to be correct!


----------------------------------------
define i32 @test33(i32 %b) {
%0:
  %t4.mask = and i32 %b, 1
  %t10 = xor i32 %t4.mask, 1
  %t12 = and i32 %b, 4294967294
  %t13 = or i32 %t12, %t10
  ret i32 %t13
}
=>
define i32 @test33(i32 %b) {
%0:
  %t13 = xor i32 %b, 1
  ret i32 %t13
}
Transformation seems to be correct!


----------------------------------------
define i32 @test33b(i32 %b) {
%0:
  %t4.mask = and i32 %b, 1
  %t10 = xor i32 %t4.mask, 1
  %t12 = and i32 %b, 4294967294
  %t13 = or i32 %t10, %t12
  ret i32 %t13
}
=>
define i32 @test33b(i32 %b) {
%0:
  %t13 = xor i32 %b, 1
  ret i32 %t13
}
Transformation seems to be correct!


----------------------------------------
define <2 x i32> @test33vec(<2 x i32> %b) {
%0:
  %t4.mask = and <2 x i32> %b, { 1, 1 }
  %t10 = xor <2 x i32> %t4.mask, { 1, 1 }
  %t12 = and <2 x i32> %b, { 4294967294, 4294967294 }
  %t13 = or <2 x i32> %t12, %t10
  ret <2 x i32> %t13
}
=>
define <2 x i32> @test33vec(<2 x i32> %b) {
%0:
  %t13 = xor <2 x i32> %b, { 1, 1 }
  ret <2 x i32> %t13
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define <2 x i32> @test33vecb(<2 x i32> %b) {
%0:
  %t4.mask = and <2 x i32> %b, { 1, 1 }
  %t10 = xor <2 x i32> %t4.mask, { 1, 1 }
  %t12 = and <2 x i32> %b, { 4294967294, 4294967294 }
  %t13 = or <2 x i32> %t10, %t12
  ret <2 x i32> %t13
}
=>
define <2 x i32> @test33vecb(<2 x i32> %b) {
%0:
  %t13 = xor <2 x i32> %b, { 1, 1 }
  ret <2 x i32> %t13
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define i32 @test34(i32 %A, i32 %B) {
%0:
  %t2 = or i32 %B, %A
  %t4 = and i32 %t2, %B
  ret i32 %t4
}
=>
define i32 @test34(i32 %A, i32 %B) {
%0:
  ret i32 %B
}
Transformation seems to be correct!


----------------------------------------
define <2 x i32> @PR24942(<2 x i32> %x) {
%0:
  %lshr = lshr <2 x i32> %x, { 31, 31 }
  %and = and <2 x i32> %lshr, { 2, 2 }
  ret <2 x i32> %and
}
=>
define <2 x i32> @PR24942(<2 x i32> %x) {
%0:
  ret <2 x i32> { 0, 0 }
}
Transformation seems to be correct!


----------------------------------------
define i64 @test35(i32 %X) {
%0:
  %zext = zext i32 %X to i64
  %zsub = sub i64 0, %zext
  %res = and i64 %zsub, 240
  ret i64 %res
}
=>
define i64 @test35(i32 %X) {
%0:
  %1 = sub i32 0, %X
  %2 = and i32 %1, 240
  %res = zext i32 %2 to i64
  ret i64 %res
}
Transformation seems to be correct!


----------------------------------------
define <2 x i64> @test35_uniform(<2 x i32> %X) {
%0:
  %zext = zext <2 x i32> %X to <2 x i64>
  %zsub = sub <2 x i64> { 0, 0 }, %zext
  %res = and <2 x i64> %zsub, { 240, 240 }
  ret <2 x i64> %res
}
=>
define <2 x i64> @test35_uniform(<2 x i32> %X) {
%0:
  %zext = zext <2 x i32> %X to <2 x i64>
  %zsub = sub nsw <2 x i64> { 0, 0 }, %zext
  %res = and <2 x i64> %zsub, { 240, 240 }
  ret <2 x i64> %res
}
Transformation seems to be correct!


----------------------------------------
define i64 @test36(i32 %X) {
%0:
  %zext = zext i32 %X to i64
  %zsub = add i64 %zext, 7
  %res = and i64 %zsub, 240
  ret i64 %res
}
=>
define i64 @test36(i32 %X) {
%0:
  %1 = add i32 %X, 7
  %2 = and i32 %1, 240
  %res = zext i32 %2 to i64
  ret i64 %res
}
Transformation seems to be correct!


----------------------------------------
define <2 x i64> @test36_undef(<2 x i32> %X) {
%0:
  %zext = zext <2 x i32> %X to <2 x i64>
  %zsub = add <2 x i64> %zext, { 7, undef }
  %res = and <2 x i64> %zsub, { 240, undef }
  ret <2 x i64> %res
}
=>
define <2 x i64> @test36_undef(<2 x i32> %X) {
%0:
  %zext = zext <2 x i32> %X to <2 x i64>
  %zsub = add <2 x i64> %zext, { 7, undef }
  %res = and <2 x i64> %zsub, { 240, undef }
  ret <2 x i64> %res
}
Transformation seems to be correct!


----------------------------------------
define i64 @test37(i32 %X) {
%0:
  %zext = zext i32 %X to i64
  %zsub = mul i64 %zext, 7
  %res = and i64 %zsub, 240
  ret i64 %res
}
=>
define i64 @test37(i32 %X) {
%0:
  %1 = mul i32 %X, 7
  %2 = and i32 %1, 240
  %res = zext i32 %2 to i64
  ret i64 %res
}
Transformation seems to be correct!


----------------------------------------
define <2 x i64> @test37_nonuniform(<2 x i32> %X) {
%0:
  %zext = zext <2 x i32> %X to <2 x i64>
  %zsub = mul <2 x i64> %zext, { 7, 9 }
  %res = and <2 x i64> %zsub, { 240, 110 }
  ret <2 x i64> %res
}
=>
define <2 x i64> @test37_nonuniform(<2 x i32> %X) {
%0:
  %zext = zext <2 x i32> %X to <2 x i64>
  %zsub = mul nsw nuw <2 x i64> %zext, { 7, 9 }
  %res = and <2 x i64> %zsub, { 240, 110 }
  ret <2 x i64> %res
}
Transformation seems to be correct!


----------------------------------------
define i64 @test38(i32 %X) {
%0:
  %zext = zext i32 %X to i64
  %zsub = xor i64 %zext, 7
  %res = and i64 %zsub, 240
  ret i64 %res
}
=>
define i64 @test38(i32 %X) {
%0:
  %1 = and i32 %X, 240
  %res = zext i32 %1 to i64
  ret i64 %res
}
Transformation seems to be correct!


----------------------------------------
define i64 @test39(i32 %X) {
%0:
  %zext = zext i32 %X to i64
  %zsub = or i64 %zext, 7
  %res = and i64 %zsub, 240
  ret i64 %res
}
=>
define i64 @test39(i32 %X) {
%0:
  %1 = and i32 %X, 240
  %res = zext i32 %1 to i64
  ret i64 %res
}
Transformation seems to be correct!


----------------------------------------
define i32 @test40(i1 %C) {
%0:
  %A = select i1 %C, i32 1000, i32 10
  %V = and i32 %A, 123
  ret i32 %V
}
=>
define i32 @test40(i1 %C) {
%0:
  %A = select i1 %C, i32 104, i32 10
  ret i32 %A
}
Transformation seems to be correct!


----------------------------------------
define <2 x i32> @test40vec(i1 %C) {
%0:
  %A = select i1 %C, <2 x i32> { 1000, 1000 }, <2 x i32> { 10, 10 }
  %V = and <2 x i32> %A, { 123, 123 }
  ret <2 x i32> %V
}
=>
define <2 x i32> @test40vec(i1 %C) {
%0:
  %A = select i1 %C, <2 x i32> { 104, 104 }, <2 x i32> { 10, 10 }
  ret <2 x i32> %A
}
Transformation seems to be correct!


----------------------------------------
define <2 x i32> @test40vec2(i1 %C) {
%0:
  %A = select i1 %C, <2 x i32> { 1000, 2500 }, <2 x i32> { 10, 30 }
  %V = and <2 x i32> %A, { 123, 333 }
  ret <2 x i32> %V
}
=>
define <2 x i32> @test40vec2(i1 %C) {
%0:
  %V = select i1 %C, <2 x i32> { 104, 324 }, <2 x i32> { 10, 12 }
  ret <2 x i32> %V
}
Transformation seems to be correct!


----------------------------------------
define i32 @test41(i1 %which) {
%entry:
  br i1 %which, label %final, label %delay

%delay:
  br label %final

%final:
  %A = phi i32 [ 1000, %entry ], [ 10, %delay ]
  %value = and i32 %A, 123
  ret i32 %value
}
=>
define i32 @test41(i1 %which) {
%entry:
  br i1 %which, label %final, label %delay

%delay:
  br label %final

%final:
  %A = phi i32 [ 104, %entry ], [ 10, %delay ]
  ret i32 %A
}
Transformation seems to be correct!


----------------------------------------
define <2 x i32> @test41vec(i1 %which) {
%entry:
  br i1 %which, label %final, label %delay

%delay:
  br label %final

%final:
  %A = phi <2 x i32> [ { 1000, 1000 }, %entry ], [ { 10, 10 }, %delay ]
  %value = and <2 x i32> %A, { 123, 123 }
  ret <2 x i32> %value
}
=>
define <2 x i32> @test41vec(i1 %which) {
%entry:
  br i1 %which, label %final, label %delay

%delay:
  br label %final

%final:
  %A = phi <2 x i32> [ { 104, 104 }, %entry ], [ { 10, 10 }, %delay ]
  ret <2 x i32> %A
}
Transformation seems to be correct!


----------------------------------------
define <2 x i32> @test41vec2(i1 %which) {
%entry:
  br i1 %which, label %final, label %delay

%delay:
  br label %final

%final:
  %A = phi <2 x i32> [ { 1000, 2500 }, %entry ], [ { 10, 30 }, %delay ]
  %value = and <2 x i32> %A, { 123, 333 }
  ret <2 x i32> %value
}
=>
define <2 x i32> @test41vec2(i1 %which) {
%entry:
  br i1 %which, label %final, label %delay

%delay:
  br label %final

%final:
  %A = phi <2 x i32> [ { 104, 324 }, %entry ], [ { 10, 12 }, %delay ]
  ret <2 x i32> %A
}
Transformation seems to be correct!


----------------------------------------
define i32 @test42(i32 %a, i32 %c, i32 %d) {
%0:
  %force = mul i32 %c, %d
  %or = or i32 %a, %force
  %nota = xor i32 %a, 4294967295
  %xor = xor i32 %nota, %force
  %and = and i32 %xor, %or
  ret i32 %and
}
=>
define i32 @test42(i32 %a, i32 %c, i32 %d) {
%0:
  %force = mul i32 %c, %d
  %and = and i32 %force, %a
  ret i32 %and
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define i32 @test43(i32 %a, i32 %c, i32 %d) {
%0:
  %force = mul i32 %c, %d
  %or = or i32 %a, %force
  %nota = xor i32 %a, 4294967295
  %xor = xor i32 %nota, %force
  %and = and i32 %or, %xor
  ret i32 %and
}
=>
define i32 @test43(i32 %a, i32 %c, i32 %d) {
%0:
  %force = mul i32 %c, %d
  %and = and i32 %force, %a
  ret i32 %and
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define i32 @test44(i32 %x, i32 %y) {
%0:
  %n = xor i32 %y, 4294967295
  %o = or i32 %n, %x
  %a = and i32 %o, %y
  ret i32 %a
}
=>
define i32 @test44(i32 %x, i32 %y) {
%0:
  %a = and i32 %x, %y
  ret i32 %a
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define i32 @test45(i32 %x, i32 %y) {
%0:
  %n = xor i32 %y, 4294967295
  %o = or i32 %x, %n
  %a = and i32 %o, %y
  ret i32 %a
}
=>
define i32 @test45(i32 %x, i32 %y) {
%0:
  %a = and i32 %x, %y
  ret i32 %a
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define i32 @test46(i32 %x, i32 %y) {
%0:
  %n = xor i32 %y, 4294967295
  %o = or i32 %n, %x
  %a = and i32 %y, %o
  ret i32 %a
}
=>
define i32 @test46(i32 %x, i32 %y) {
%0:
  %a = and i32 %x, %y
  ret i32 %a
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define i32 @test47(i32 %x, i32 %y) {
%0:
  %n = xor i32 %y, 4294967295
  %o = or i32 %x, %n
  %a = and i32 %y, %o
  ret i32 %a
}
=>
define i32 @test47(i32 %x, i32 %y) {
%0:
  %a = and i32 %x, %y
  ret i32 %a
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define i1 @and_orn_cmp_1(i32 %a, i32 %b, i32 %c) {
%0:
  %x = icmp sgt i32 %a, %b
  %x_inv = icmp sle i32 %a, %b
  %y = icmp ugt i32 %c, 42
  %or = or i1 %y, %x_inv
  %and = and i1 %x, %or
  ret i1 %and
}
=>
define i1 @and_orn_cmp_1(i32 %a, i32 %b, i32 %c) {
%0:
  %x = icmp sgt i32 %a, %b
  %y = icmp ugt i32 %c, 42
  %and = and i1 %x, %y
  ret i1 %and
}
Transformation seems to be correct!


----------------------------------------
define i1 @and_orn_cmp_1_logical(i32 %a, i32 %b, i32 %c) {
%0:
  %x = icmp sgt i32 %a, %b
  %x_inv = icmp sle i32 %a, %b
  %y = icmp ugt i32 %c, 42
  %or = select i1 %y, i1 1, i1 %x_inv
  %and = select i1 %x, i1 %or, i1 0
  ret i1 %and
}
=>
define i1 @and_orn_cmp_1_logical(i32 %a, i32 %b, i32 %c) {
%0:
  %x = icmp sgt i32 %a, %b
  %y = icmp ugt i32 %c, 42
  %and = and i1 %x, %y
  ret i1 %and
}
Transformation doesn't verify!
ERROR: Target is more poisonous than source

Example:
i32 %a = #x80000001 (2147483649, -2147483647)
i32 %b = #x00000000 (0)
i32 %c = poison

Source:
i1 %x = #x0 (0)
i1 %x_inv = #x1 (1)
i1 %y = poison
i1 %or = poison
i1 %and = #x0 (0)

Target:
i1 %x = #x0 (0)
i1 %y = poison
i1 %and = poison
Source value: #x0 (0)
Target value: poison


------------------- SMT STATS -------------------
Num queries: 204
Num invalid: 0
Num skips:   0
Num trivial: 289 (58.6%)
Num timeout: 8 (3.9%)
Num errors:  0 (0.0%)
Num SAT:     73 (35.8%)
Num UNSAT:   123 (60.3%)

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/and.ll

Alive2: Transform doesn't verify; aborting!
FileCheck error: '<stdin>' is empty.
FileCheck command line:  /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/InstCombine/and.ll

 

<-- Back