Test Failure: Transforms/InstCombine/select-of-bittest.ll

Test source: git

Log:

Source: <stdin>

----------------------------------------
define i32 @and_lshr_and(i32 %arg) {
%0:
  %tmp = and i32 %arg, 1
  %tmp1 = icmp eq i32 %tmp, 0
  %tmp2 = lshr i32 %arg, 1
  %tmp3 = and i32 %tmp2, 1
  %tmp4 = select i1 %tmp1, i32 %tmp3, i32 1
  ret i32 %tmp4
}
=>
define i32 @and_lshr_and(i32 %arg) {
%0:
  %1 = and i32 %arg, 3
  %2 = icmp ne i32 %1, 0
  %tmp4 = zext i1 %2 to i32
  ret i32 %tmp4
}
Transformation seems to be correct!


----------------------------------------
define <2 x i32> @and_lshr_and_splatvec(<2 x i32> %arg) {
%0:
  %tmp = and <2 x i32> %arg, { 1, 1 }
  %tmp1 = icmp eq <2 x i32> %tmp, { 0, 0 }
  %tmp2 = lshr <2 x i32> %arg, { 1, 1 }
  %tmp3 = and <2 x i32> %tmp2, { 1, 1 }
  %tmp4 = select <2 x i1> %tmp1, <2 x i32> %tmp3, <2 x i32> { 1, 1 }
  ret <2 x i32> %tmp4
}
=>
define <2 x i32> @and_lshr_and_splatvec(<2 x i32> %arg) {
%0:
  %1 = and <2 x i32> %arg, { 3, 3 }
  %2 = icmp ne <2 x i32> %1, { 0, 0 }
  %tmp4 = zext <2 x i1> %2 to <2 x i32>
  ret <2 x i32> %tmp4
}
Transformation seems to be correct!


----------------------------------------
define <2 x i32> @and_lshr_and_vec_v0(<2 x i32> %arg) {
%0:
  %tmp = and <2 x i32> %arg, { 1, 4 }
  %tmp1 = icmp eq <2 x i32> %tmp, { 0, 0 }
  %tmp2 = lshr <2 x i32> %arg, { 1, 1 }
  %tmp3 = and <2 x i32> %tmp2, { 1, 1 }
  %tmp4 = select <2 x i1> %tmp1, <2 x i32> %tmp3, <2 x i32> { 1, 1 }
  ret <2 x i32> %tmp4
}
=>
define <2 x i32> @and_lshr_and_vec_v0(<2 x i32> %arg) {
%0:
  %1 = and <2 x i32> %arg, { 3, 6 }
  %2 = icmp ne <2 x i32> %1, { 0, 0 }
  %tmp4 = zext <2 x i1> %2 to <2 x i32>
  ret <2 x i32> %tmp4
}
Transformation seems to be correct!


----------------------------------------
define <2 x i32> @and_lshr_and_vec_v1(<2 x i32> %arg) {
%0:
  %tmp = and <2 x i32> %arg, { 1, 1 }
  %tmp1 = icmp eq <2 x i32> %tmp, { 0, 0 }
  %tmp2 = lshr <2 x i32> %arg, { 1, 2 }
  %tmp3 = and <2 x i32> %tmp2, { 1, 1 }
  %tmp4 = select <2 x i1> %tmp1, <2 x i32> %tmp3, <2 x i32> { 1, 1 }
  ret <2 x i32> %tmp4
}
=>
define <2 x i32> @and_lshr_and_vec_v1(<2 x i32> %arg) {
%0:
  %1 = and <2 x i32> %arg, { 3, 5 }
  %2 = icmp ne <2 x i32> %1, { 0, 0 }
  %tmp4 = zext <2 x i1> %2 to <2 x i32>
  ret <2 x i32> %tmp4
}
Transformation seems to be correct!


----------------------------------------
define <2 x i32> @and_lshr_and_vec_v2(<2 x i32> %arg) {
%0:
  %tmp = and <2 x i32> %arg, { 8, 1 }
  %tmp1 = icmp eq <2 x i32> %tmp, { 0, 0 }
  %tmp2 = lshr <2 x i32> %arg, { 2, 1 }
  %tmp3 = and <2 x i32> %tmp2, { 1, 1 }
  %tmp4 = select <2 x i1> %tmp1, <2 x i32> %tmp3, <2 x i32> { 1, 1 }
  ret <2 x i32> %tmp4
}
=>
define <2 x i32> @and_lshr_and_vec_v2(<2 x i32> %arg) {
%0:
  %1 = and <2 x i32> %arg, { 12, 3 }
  %2 = icmp ne <2 x i32> %1, { 0, 0 }
  %tmp4 = zext <2 x i1> %2 to <2 x i32>
  ret <2 x i32> %tmp4
}
Transformation seems to be correct!


----------------------------------------
define <3 x i32> @and_lshr_and_vec_undef(<3 x i32> %arg) {
%0:
  %tmp = and <3 x i32> %arg, { 1, undef, 1 }
  %tmp1 = icmp eq <3 x i32> %tmp, { 0, undef, 0 }
  %tmp2 = lshr <3 x i32> %arg, { 1, undef, 1 }
  %tmp3 = and <3 x i32> %tmp2, { 1, undef, 1 }
  %tmp4 = select <3 x i1> %tmp1, <3 x i32> %tmp3, <3 x i32> { 1, undef, 1 }
  ret <3 x i32> %tmp4
}
=>
define <3 x i32> @and_lshr_and_vec_undef(<3 x i32> %arg) {
%0:
  %1 = and <3 x i32> %arg, { 3, poison, 3 }
  %2 = icmp ne <3 x i32> %1, { 0, 0, 0 }
  %tmp4 = zext <3 x i1> %2 to <3 x i32>
  ret <3 x i32> %tmp4
}
Transformation seems to be correct!


----------------------------------------
define i32 @and_and(i32 %arg) {
%0:
  %tmp = and i32 %arg, 2
  %tmp1 = icmp eq i32 %tmp, 0
  %tmp2 = and i32 %arg, 1
  %tmp3 = select i1 %tmp1, i32 %tmp2, i32 1
  ret i32 %tmp3
}
=>
define i32 @and_and(i32 %arg) {
%0:
  %1 = and i32 %arg, 3
  %2 = icmp ne i32 %1, 0
  %tmp3 = zext i1 %2 to i32
  ret i32 %tmp3
}
Transformation seems to be correct!


----------------------------------------
define <2 x i32> @and_and_splatvec(<2 x i32> %arg) {
%0:
  %tmp = and <2 x i32> %arg, { 2, 2 }
  %tmp1 = icmp eq <2 x i32> %tmp, { 0, 0 }
  %tmp2 = and <2 x i32> %arg, { 1, 1 }
  %tmp3 = select <2 x i1> %tmp1, <2 x i32> %tmp2, <2 x i32> { 1, 1 }
  ret <2 x i32> %tmp3
}
=>
define <2 x i32> @and_and_splatvec(<2 x i32> %arg) {
%0:
  %1 = and <2 x i32> %arg, { 3, 3 }
  %2 = icmp ne <2 x i32> %1, { 0, 0 }
  %tmp3 = zext <2 x i1> %2 to <2 x i32>
  ret <2 x i32> %tmp3
}
Transformation seems to be correct!


----------------------------------------
define <2 x i32> @and_and_vec(<2 x i32> %arg) {
%0:
  %tmp = and <2 x i32> %arg, { 6, 2 }
  %tmp1 = icmp eq <2 x i32> %tmp, { 0, 0 }
  %tmp2 = and <2 x i32> %arg, { 1, 1 }
  %tmp3 = select <2 x i1> %tmp1, <2 x i32> %tmp2, <2 x i32> { 1, 1 }
  ret <2 x i32> %tmp3
}
=>
define <2 x i32> @and_and_vec(<2 x i32> %arg) {
%0:
  %1 = and <2 x i32> %arg, { 7, 3 }
  %2 = icmp ne <2 x i32> %1, { 0, 0 }
  %tmp3 = zext <2 x i1> %2 to <2 x i32>
  ret <2 x i32> %tmp3
}
Transformation seems to be correct!


----------------------------------------
define <3 x i32> @and_and_vec_undef(<3 x i32> %arg) {
%0:
  %tmp = and <3 x i32> %arg, { 2, undef, 2 }
  %tmp1 = icmp eq <3 x i32> %tmp, { 0, undef, 0 }
  %tmp2 = and <3 x i32> %arg, { 1, undef, 1 }
  %tmp3 = select <3 x i1> %tmp1, <3 x i32> %tmp2, <3 x i32> { 1, undef, 1 }
  ret <3 x i32> %tmp3
}
=>
define <3 x i32> @and_and_vec_undef(<3 x i32> %arg) {
%0:
  %1 = and <3 x i32> %arg, { 3, 4294967295, 3 }
  %2 = icmp ne <3 x i32> %1, { 0, 0, 0 }
  %tmp3 = zext <3 x i1> %2 to <3 x i32>
  ret <3 x i32> %tmp3
}
Transformation seems to be correct!


----------------------------------------
define i32 @f_var0(i32 %arg, i32 %arg1) {
%0:
  %tmp = and i32 %arg, %arg1
  %tmp2 = icmp eq i32 %tmp, 0
  %tmp3 = lshr i32 %arg, 1
  %tmp4 = and i32 %tmp3, 1
  %tmp5 = select i1 %tmp2, i32 %tmp4, i32 1
  ret i32 %tmp5
}
=>
define i32 @f_var0(i32 %arg, i32 %arg1) {
%0:
  %1 = or i32 %arg1, 2
  %2 = and i32 %1, %arg
  %3 = icmp ne i32 %2, 0
  %tmp5 = zext i1 %3 to i32
  ret i32 %tmp5
}
Transformation seems to be correct!


----------------------------------------
define i32 @f_var0_commutative_and(i32 %arg, i32 %arg1) {
%0:
  %tmp = and i32 %arg1, %arg
  %tmp2 = icmp eq i32 %tmp, 0
  %tmp3 = lshr i32 %arg, 1
  %tmp4 = and i32 %tmp3, 1
  %tmp5 = select i1 %tmp2, i32 %tmp4, i32 1
  ret i32 %tmp5
}
=>
define i32 @f_var0_commutative_and(i32 %arg, i32 %arg1) {
%0:
  %1 = or i32 %arg1, 2
  %2 = and i32 %1, %arg
  %3 = icmp ne i32 %2, 0
  %tmp5 = zext i1 %3 to i32
  ret i32 %tmp5
}
Transformation seems to be correct!


----------------------------------------
define <2 x i32> @f_var0_splatvec(<2 x i32> %arg, <2 x i32> %arg1) {
%0:
  %tmp = and <2 x i32> %arg, %arg1
  %tmp2 = icmp eq <2 x i32> %tmp, { 0, 0 }
  %tmp3 = lshr <2 x i32> %arg, { 1, 1 }
  %tmp4 = and <2 x i32> %tmp3, { 1, 1 }
  %tmp5 = select <2 x i1> %tmp2, <2 x i32> %tmp4, <2 x i32> { 1, 1 }
  ret <2 x i32> %tmp5
}
=>
define <2 x i32> @f_var0_splatvec(<2 x i32> %arg, <2 x i32> %arg1) {
%0:
  %1 = or <2 x i32> %arg1, { 2, 2 }
  %2 = and <2 x i32> %1, %arg
  %3 = icmp ne <2 x i32> %2, { 0, 0 }
  %tmp5 = zext <2 x i1> %3 to <2 x i32>
  ret <2 x i32> %tmp5
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define <2 x i32> @f_var0_vec(<2 x i32> %arg, <2 x i32> %arg1) {
%0:
  %tmp = and <2 x i32> %arg, %arg1
  %tmp2 = icmp eq <2 x i32> %tmp, { 0, 0 }
  %tmp3 = lshr <2 x i32> %arg, { 1, 2 }
  %tmp4 = and <2 x i32> %tmp3, { 1, 1 }
  %tmp5 = select <2 x i1> %tmp2, <2 x i32> %tmp4, <2 x i32> { 1, 1 }
  ret <2 x i32> %tmp5
}
=>
define <2 x i32> @f_var0_vec(<2 x i32> %arg, <2 x i32> %arg1) {
%0:
  %1 = or <2 x i32> %arg1, { 2, 4 }
  %2 = and <2 x i32> %1, %arg
  %3 = icmp ne <2 x i32> %2, { 0, 0 }
  %tmp5 = zext <2 x i1> %3 to <2 x i32>
  ret <2 x i32> %tmp5
}
Transformation seems to be correct!


----------------------------------------
define <3 x i32> @f_var0_vec_undef(<3 x i32> %arg, <3 x i32> %arg1) {
%0:
  %tmp = and <3 x i32> %arg, %arg1
  %tmp2 = icmp eq <3 x i32> %tmp, { 0, undef, 0 }
  %tmp3 = lshr <3 x i32> %arg, { 1, undef, 1 }
  %tmp4 = and <3 x i32> %tmp3, { 1, undef, 1 }
  %tmp5 = select <3 x i1> %tmp2, <3 x i32> %tmp4, <3 x i32> { 1, undef, 1 }
  ret <3 x i32> %tmp5
}
=>
define <3 x i32> @f_var0_vec_undef(<3 x i32> %arg, <3 x i32> %arg1) {
%0:
  %1 = or <3 x i32> %arg1, { 2, poison, 2 }
  %2 = and <3 x i32> %1, %arg
  %3 = icmp ne <3 x i32> %2, { 0, 0, 0 }
  %tmp5 = zext <3 x i1> %3 to <3 x i32>
  ret <3 x i32> %tmp5
}
Transformation seems to be correct!


----------------------------------------
define i32 @f_var1(i32 %arg, i32 %arg1) {
%0:
  %tmp = and i32 %arg, %arg1
  %tmp2 = icmp eq i32 %tmp, 0
  %tmp3 = and i32 %arg, 1
  %tmp4 = select i1 %tmp2, i32 %tmp3, i32 1
  ret i32 %tmp4
}
=>
define i32 @f_var1(i32 %arg, i32 %arg1) {
%0:
  %1 = or i32 %arg1, 1
  %2 = and i32 %1, %arg
  %3 = icmp ne i32 %2, 0
  %tmp4 = zext i1 %3 to i32
  ret i32 %tmp4
}
Transformation seems to be correct!


----------------------------------------
define i32 @f_var1_commutative_and(i32 %arg, i32 %arg1) {
%0:
  %tmp = and i32 %arg1, %arg
  %tmp2 = icmp eq i32 %tmp, 0
  %tmp3 = and i32 %arg, 1
  %tmp4 = select i1 %tmp2, i32 %tmp3, i32 1
  ret i32 %tmp4
}
=>
define i32 @f_var1_commutative_and(i32 %arg, i32 %arg1) {
%0:
  %1 = or i32 %arg1, 1
  %2 = and i32 %1, %arg
  %3 = icmp ne i32 %2, 0
  %tmp4 = zext i1 %3 to i32
  ret i32 %tmp4
}
Transformation seems to be correct!


----------------------------------------
define <2 x i32> @f_var1_vec(<2 x i32> %arg, <2 x i32> %arg1) {
%0:
  %tmp = and <2 x i32> %arg, %arg1
  %tmp2 = icmp eq <2 x i32> %tmp, { 0, 0 }
  %tmp3 = and <2 x i32> %arg, { 1, 1 }
  %tmp4 = select <2 x i1> %tmp2, <2 x i32> %tmp3, <2 x i32> { 1, 1 }
  ret <2 x i32> %tmp4
}
=>
define <2 x i32> @f_var1_vec(<2 x i32> %arg, <2 x i32> %arg1) {
%0:
  %1 = or <2 x i32> %arg1, { 1, 1 }
  %2 = and <2 x i32> %1, %arg
  %3 = icmp ne <2 x i32> %2, { 0, 0 }
  %tmp4 = zext <2 x i1> %3 to <2 x i32>
  ret <2 x i32> %tmp4
}
Transformation seems to be correct!


----------------------------------------
define <3 x i32> @f_var1_vec_undef(<3 x i32> %arg, <3 x i32> %arg1) {
%0:
  %tmp = and <3 x i32> %arg, %arg1
  %tmp2 = icmp eq <3 x i32> %tmp, { 0, undef, 0 }
  %tmp3 = and <3 x i32> %arg, { 1, undef, 1 }
  %tmp4 = select <3 x i1> %tmp2, <3 x i32> %tmp3, <3 x i32> { 1, undef, 1 }
  ret <3 x i32> %tmp4
}
=>
define <3 x i32> @f_var1_vec_undef(<3 x i32> %arg, <3 x i32> %arg1) {
%0:
  %1 = or <3 x i32> %arg1, { 1, 1, 1 }
  %2 = and <3 x i32> %1, %arg
  %3 = icmp ne <3 x i32> %2, { 0, 0, 0 }
  %tmp4 = zext <3 x i1> %3 to <3 x i32>
  ret <3 x i32> %tmp4
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define i32 @f_var2(i32 %arg, i32 %arg1) {
%0:
  %tmp = and i32 %arg, 1
  %tmp2 = icmp eq i32 %tmp, 0
  %tmp3 = lshr i32 %arg, %arg1
  %tmp4 = and i32 %tmp3, 1
  %tmp5 = select i1 %tmp2, i32 %tmp4, i32 1
  ret i32 %tmp5
}
=>
define i32 @f_var2(i32 %arg, i32 %arg1) {
%0:
  %1 = shl i32 1, %arg1
  %2 = or i32 %1, 1
  %3 = and i32 %2, %arg
  %4 = icmp ne i32 %3, 0
  %tmp5 = zext i1 %4 to i32
  ret i32 %tmp5
}
Transformation doesn't verify!
ERROR: Target is more poisonous than source

Example:
i32 %arg = #x00000001 (1)
i32 %arg1 = poison

Source:
i32 %tmp = #x00000001 (1)
i1 %tmp2 = #x0 (0)
i32 %tmp3 = poison
i32 %tmp4 = poison
i32 %tmp5 = #x00000001 (1)

Target:
i32 %1 = poison
i32 %2 = poison
i32 %3 = poison
i1 %4 = poison
i32 %tmp5 = poison
Source value: #x00000001 (1)
Target value: poison


------------------- SMT STATS -------------------
Num queries: 118
Num invalid: 0
Num skips:   0
Num trivial: 62 (34.4%)
Num timeout: 2 (1.7%)
Num errors:  0 (0.0%)
Num SAT:     61 (51.7%)
Num UNSAT:   55 (46.6%)
Alive2: Transform doesn't verify; aborting!

stderr:

+ : 'RUN: at line 2'
+ /home/nuno/llvm/build/bin/FileCheck /home/nuno/llvm/llvm/test/Transforms/InstCombine/select-of-bittest.ll
+ /home/nuno/alive2/build/opt-alive.sh -passes=instcombine -S

FileCheck error: '<stdin>' is empty.
FileCheck command line:  /home/nuno/llvm/build/bin/FileCheck /home/nuno/llvm/llvm/test/Transforms/InstCombine/select-of-bittest.ll

 

<-- Back