Test Failure: Transforms/InstCombine/select-binop-cmp.ll

Test source: git

Comments: Alive2 missing support for speculatable attribute

Log:

Source: <stdin>

----------------------------------------
define i32 @select_xor_icmp(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp eq i32 %x, 0
  %B = xor i32 %x, %z
  %C = select i1 %A, i32 %B, i32 %y
  ret i32 %C
}
=>
define i32 @select_xor_icmp(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp eq i32 %x, 0
  %C = select i1 %A, i32 %z, i32 %y
  ret i32 %C
}
Transformation seems to be correct!


----------------------------------------
define i32 @select_xor_icmp2(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp ne i32 %x, 0
  %B = xor i32 %x, %z
  %C = select i1 %A, i32 %y, i32 %B
  ret i32 %C
}
=>
define i32 @select_xor_icmp2(i32 %x, i32 %y, i32 %z) {
%0:
  %A.not = icmp eq i32 %x, 0
  %C = select i1 %A.not, i32 %z, i32 %y
  ret i32 %C
}
Transformation seems to be correct!


----------------------------------------
define i32 @select_xor_icmp_meta(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp eq i32 %x, 0
  %B = xor i32 %x, %z
  %C = select i1 %A, i32 %B, i32 %y
  ret i32 %C
}
=>
define i32 @select_xor_icmp_meta(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp eq i32 %x, 0
  %C = select i1 %A, i32 %z, i32 %y
  ret i32 %C
}
Transformation seems to be correct!


----------------------------------------
define i32 @select_mul_icmp(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp eq i32 %x, 1
  %B = mul i32 %x, %z
  %C = select i1 %A, i32 %B, i32 %y
  ret i32 %C
}
=>
define i32 @select_mul_icmp(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp eq i32 %x, 1
  %C = select i1 %A, i32 %z, i32 %y
  ret i32 %C
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define i32 @select_add_icmp(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp eq i32 %x, 0
  %B = add i32 %x, %z
  %C = select i1 %A, i32 %B, i32 %y
  ret i32 %C
}
=>
define i32 @select_add_icmp(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp eq i32 %x, 0
  %C = select i1 %A, i32 %z, i32 %y
  ret i32 %C
}
Transformation seems to be correct!


----------------------------------------
define i32 @select_or_icmp(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp eq i32 %x, 0
  %B = or i32 %x, %z
  %C = select i1 %A, i32 %B, i32 %y
  ret i32 %C
}
=>
define i32 @select_or_icmp(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp eq i32 %x, 0
  %C = select i1 %A, i32 %z, i32 %y
  ret i32 %C
}
Transformation seems to be correct!


----------------------------------------
define i32 @select_and_icmp(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp eq i32 %x, 4294967295
  %B = and i32 %x, %z
  %C = select i1 %A, i32 %B, i32 %y
  ret i32 %C
}
=>
define i32 @select_and_icmp(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp eq i32 %x, 4294967295
  %C = select i1 %A, i32 %z, i32 %y
  ret i32 %C
}
Transformation seems to be correct!


----------------------------------------
define <2 x i8> @select_xor_icmp_vec(<2 x i8> %x, <2 x i8> %y, <2 x i8> %z) {
%0:
  %A = icmp eq <2 x i8> %x, { 0, 0 }
  %B = xor <2 x i8> %x, %z
  %C = select <2 x i1> %A, <2 x i8> %B, <2 x i8> %y
  ret <2 x i8> %C
}
=>
define <2 x i8> @select_xor_icmp_vec(<2 x i8> %x, <2 x i8> %y, <2 x i8> %z) {
%0:
  %A = icmp eq <2 x i8> %x, { 0, 0 }
  %C = select <2 x i1> %A, <2 x i8> %z, <2 x i8> %y
  ret <2 x i8> %C
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define <2 x i8> @select_xor_icmp_vec_use(<2 x i8> %x, <2 x i8> %y, <2 x i8> %z) {
%0:
  %A = icmp ne <2 x i8> %x, { 0, 0 }
  call void @use(<2 x i1> %A)
  %B = xor <2 x i8> %x, %z
  %C = select <2 x i1> %A, <2 x i8> %y, <2 x i8> %B
  ret <2 x i8> %C
}
=>
define <2 x i8> @select_xor_icmp_vec_use(<2 x i8> %x, <2 x i8> %y, <2 x i8> %z) {
%0:
  %A = icmp ne <2 x i8> %x, { 0, 0 }
  call void @use(<2 x i1> %A)
  %C = select <2 x i1> %A, <2 x i8> %y, <2 x i8> %z
  ret <2 x i8> %C
}
Transformation seems to be correct!


----------------------------------------
define i32 @select_xor_inv_icmp(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp eq i32 %x, 0
  %B = xor i32 %z, %x
  %C = select i1 %A, i32 %B, i32 %y
  ret i32 %C
}
=>
define i32 @select_xor_inv_icmp(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp eq i32 %x, 0
  %C = select i1 %A, i32 %z, i32 %y
  ret i32 %C
}
Transformation seems to be correct!


----------------------------------------
define i32 @select_xor_inv_icmp2(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp ne i32 %x, 0
  call void @use2(i1 %A)
  %B = xor i32 %x, %z
  %C = select i1 %A, i32 %y, i32 %B
  ret i32 %C
}
=>
define i32 @select_xor_inv_icmp2(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp ne i32 %x, 0
  call void @use2(i1 %A)
  %C = select i1 %A, i32 %y, i32 %z
  ret i32 %C
}
Transformation seems to be correct!


----------------------------------------
define float @select_fadd_fcmp(float %x, float %y, float %z) {
%0:
  %A = fcmp oeq float %x, -0.000000
  %B = fadd nsz float %x, %z, exceptions=ignore
  %C = select i1 %A, float %B, float %y
  ret float %C
}
=>
define float @select_fadd_fcmp(float %x, float %y, float %z) {
%0:
  %A = fcmp oeq float %x, 0.000000
  %C = select i1 %A, float %z, float %y
  ret float %C
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define float @select_fadd_fcmp_poszero(float %x, float %y, float %z) {
%0:
  %A = fcmp oeq float %x, 0.000000
  %B = fadd nsz float %z, %x, exceptions=ignore
  %C = select i1 %A, float %B, float %y
  ret float %C
}
=>
define float @select_fadd_fcmp_poszero(float %x, float %y, float %z) {
%0:
  %A = fcmp oeq float %x, 0.000000
  %C = select i1 %A, float %z, float %y
  ret float %C
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define float @select_fadd_fcmp_2(float %x, float %y, float %v) {
%0:
  %A = fcmp une float %x, -0.000000
  %z = fadd float %v, 0.000000, exceptions=ignore
  %B = fadd float %z, %x, exceptions=ignore
  %C = select i1 %A, float %y, float %B
  ret float %C
}
=>
define float @select_fadd_fcmp_2(float %x, float %y, float %v) {
%0:
  %A = fcmp une float %x, 0.000000
  %z = fadd float %v, 0.000000, exceptions=ignore
  %C = select i1 %A, float %y, float %z
  ret float %C
}
Transformation seems to be correct!


----------------------------------------
define float @select_fadd_fcmp_2_poszero(float %x, float %y, float %v) {
%0:
  %A = fcmp une float %x, 0.000000
  %z = fadd float %v, 0.000000, exceptions=ignore
  %B = fadd float %z, %x, exceptions=ignore
  %C = select i1 %A, float %y, float %B
  ret float %C
}
=>
define float @select_fadd_fcmp_2_poszero(float %x, float %y, float %v) {
%0:
  %A = fcmp une float %x, 0.000000
  %z = fadd float %v, 0.000000, exceptions=ignore
  %C = select i1 %A, float %y, float %z
  ret float %C
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define float @select_fadd_fcmp_3(float %x, float %y) {
%0:
  %A = fcmp une float %x, -0.000000
  %B = fadd float 6.000000, %x, exceptions=ignore
  %C = select i1 %A, float %y, float %B
  ret float %C
}
=>
define float @select_fadd_fcmp_3(float %x, float %y) {
%0:
  %A = fcmp une float %x, 0.000000
  %C = select i1 %A, float %y, float 6.000000
  ret float %C
}
Transformation seems to be correct!


----------------------------------------
define float @select_fadd_fcmp_3_poszero(float %x, float %y) {
%0:
  %A = fcmp une float %x, 0.000000
  %B = fadd float 6.000000, %x, exceptions=ignore
  %C = select i1 %A, float %y, float %B
  ret float %C
}
=>
define float @select_fadd_fcmp_3_poszero(float %x, float %y) {
%0:
  %A = fcmp une float %x, 0.000000
  %C = select i1 %A, float %y, float 6.000000
  ret float %C
}
Transformation seems to be correct!


----------------------------------------
define float @select_fadd_fcmp_4(float %x, float %y, float %z) {
%0:
  %A = fcmp une float %x, -0.000000
  %B = fadd nsz float %z, %x, exceptions=ignore
  %C = select i1 %A, float %y, float %B
  ret float %C
}
=>
define float @select_fadd_fcmp_4(float %x, float %y, float %z) {
%0:
  %A = fcmp une float %x, 0.000000
  %C = select i1 %A, float %y, float %z
  ret float %C
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define float @select_fadd_fcmp_4_poszero(float %x, float %y, float %z) {
%0:
  %A = fcmp une float %x, 0.000000
  %B = fadd nsz float %z, %x, exceptions=ignore
  %C = select i1 %A, float %y, float %B
  ret float %C
}
=>
define float @select_fadd_fcmp_4_poszero(float %x, float %y, float %z) {
%0:
  %A = fcmp une float %x, 0.000000
  %C = select i1 %A, float %y, float %z
  ret float %C
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define float @select_fadd_fcmp_5(float %x, float %y, float %v) {
%0:
  %A = fcmp oeq float %x, -0.000000
  %z = fadd float %v, 0.000000, exceptions=ignore
  %B = fadd float %z, %x, exceptions=ignore
  %C = select i1 %A, float %B, float %y
  ret float %C
}
=>
define float @select_fadd_fcmp_5(float %x, float %y, float %v) {
%0:
  %A = fcmp oeq float %x, 0.000000
  %z = fadd float %v, 0.000000, exceptions=ignore
  %C = select i1 %A, float %z, float %y
  ret float %C
}
Transformation seems to be correct!


----------------------------------------
define float @select_fadd_fcmp_5_poszero(float %x, float %y, float %v) {
%0:
  %A = fcmp oeq float %x, 0.000000
  %z = fadd float %v, 0.000000, exceptions=ignore
  %B = fadd float %z, %x, exceptions=ignore
  %C = select i1 %A, float %B, float %y
  ret float %C
}
=>
define float @select_fadd_fcmp_5_poszero(float %x, float %y, float %v) {
%0:
  %A = fcmp oeq float %x, 0.000000
  %z = fadd float %v, 0.000000, exceptions=ignore
  %C = select i1 %A, float %z, float %y
  ret float %C
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define float @select_fadd_fcmp_6(float %x, float %y, float %z) {
%0:
  %A = fcmp oeq float %x, -0.000000
  %B = fadd float %x, 6.000000, exceptions=ignore
  %C = select i1 %A, float %B, float %y
  ret float %C
}
=>
define float @select_fadd_fcmp_6(float %x, float %y, float %z) {
%0:
  %A = fcmp oeq float %x, 0.000000
  %C = select i1 %A, float 6.000000, float %y
  ret float %C
}
Transformation seems to be correct!


----------------------------------------
define float @select_fadd_fcmp_6_poszero(float %x, float %y, float %z) {
%0:
  %A = fcmp oeq float %x, 0.000000
  %B = fadd float %x, 6.000000, exceptions=ignore
  %C = select i1 %A, float %B, float %y
  ret float %C
}
=>
define float @select_fadd_fcmp_6_poszero(float %x, float %y, float %z) {
%0:
  %A = fcmp oeq float %x, 0.000000
  %C = select i1 %A, float 6.000000, float %y
  ret float %C
}
Transformation seems to be correct!


----------------------------------------
define float @select_fmul_fcmp(float %x, float %y, float %z) {
%0:
  %A = fcmp oeq float %x, 1.000000
  %B = fmul nsz float %x, %z, exceptions=ignore
  %C = select i1 %A, float %B, float %y
  ret float %C
}
=>
define float @select_fmul_fcmp(float %x, float %y, float %z) {
%0:
  %A = fcmp oeq float %x, 1.000000
  %C = select i1 %A, float %z, float %y
  ret float %C
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define float @select_fsub_fcmp(float %x, float %y, float %z) {
%0:
  %A = fcmp oeq float %x, 0.000000
  %B = fsub nsz float %z, %x, exceptions=ignore
  %C = select i1 %A, float %B, float %y
  ret float %C
}
=>
define float @select_fsub_fcmp(float %x, float %y, float %z) {
%0:
  %A = fcmp oeq float %x, 0.000000
  %C = select i1 %A, float %z, float %y
  ret float %C
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define float @select_fsub_fcmp_negzero(float %x, float %y, float %z) {
%0:
  %A = fcmp oeq float %x, -0.000000
  %B = fsub nsz float %z, %x, exceptions=ignore
  %C = select i1 %A, float %B, float %y
  ret float %C
}
=>
define float @select_fsub_fcmp_negzero(float %x, float %y, float %z) {
%0:
  %A = fcmp oeq float %x, 0.000000
  %C = select i1 %A, float %z, float %y
  ret float %C
}
Transformation seems to be correct!


----------------------------------------
define float @select_fdiv_fcmp(float %x, float %y, float %z) {
%0:
  %A = fcmp oeq float %x, 1.000000
  %B = fdiv nsz float %z, %x, exceptions=ignore
  %C = select i1 %A, float %B, float %y
  ret float %C
}
=>
define float @select_fdiv_fcmp(float %x, float %y, float %z) {
%0:
  %A = fcmp oeq float %x, 1.000000
  %C = select i1 %A, float %z, float %y
  ret float %C
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define i32 @select_sub_icmp(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp eq i32 %x, 0
  %B = sub i32 %z, %x
  %C = select i1 %A, i32 %B, i32 %y
  ret i32 %C
}
=>
define i32 @select_sub_icmp(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp eq i32 %x, 0
  %C = select i1 %A, i32 %z, i32 %y
  ret i32 %C
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define i32 @select_sub_icmp_2(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp eq i32 %x, 0
  call void @use2(i1 %A)
  %B = sub i32 %z, %x
  %C = select i1 %A, i32 %B, i32 %y
  ret i32 %C
}
=>
define i32 @select_sub_icmp_2(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp eq i32 %x, 0
  call void @use2(i1 %A)
  %C = select i1 %A, i32 %z, i32 %y
  ret i32 %C
}
Transformation seems to be correct!


----------------------------------------
define i32 @select_sub_icmp_3(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp ne i32 %x, 0
  call void @use2(i1 %A)
  %B = sub i32 %z, %x
  %C = select i1 %A, i32 %y, i32 %B
  ret i32 %C
}
=>
define i32 @select_sub_icmp_3(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp ne i32 %x, 0
  call void @use2(i1 %A)
  %C = select i1 %A, i32 %y, i32 %z
  ret i32 %C
}
Transformation seems to be correct!


----------------------------------------
define <2 x i8> @select_sub_icmp_vec(<2 x i8> %x, <2 x i8> %y, <2 x i8> %z) {
%0:
  %A = icmp eq <2 x i8> %x, { 0, 0 }
  %B = sub <2 x i8> %z, %x
  %C = select <2 x i1> %A, <2 x i8> %B, <2 x i8> %y
  ret <2 x i8> %C
}
=>
define <2 x i8> @select_sub_icmp_vec(<2 x i8> %x, <2 x i8> %y, <2 x i8> %z) {
%0:
  %A = icmp eq <2 x i8> %x, { 0, 0 }
  %C = select <2 x i1> %A, <2 x i8> %z, <2 x i8> %y
  ret <2 x i8> %C
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define i32 @select_shl_icmp(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp ne i32 %x, 0
  call void @use2(i1 %A)
  %B = shl i32 %z, %x
  %C = select i1 %A, i32 %y, i32 %B
  ret i32 %C
}
=>
define i32 @select_shl_icmp(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp ne i32 %x, 0
  call void @use2(i1 %A)
  %C = select i1 %A, i32 %y, i32 %z
  ret i32 %C
}
Transformation seems to be correct!


----------------------------------------
define i32 @select_lshr_icmp(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp eq i32 %x, 0
  %B = lshr i32 %z, %x
  %C = select i1 %A, i32 %B, i32 %y
  ret i32 %C
}
=>
define i32 @select_lshr_icmp(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp eq i32 %x, 0
  %C = select i1 %A, i32 %z, i32 %y
  ret i32 %C
}
Transformation seems to be correct!


----------------------------------------
define i32 @select_ashr_icmp(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp ne i32 %x, 0
  call void @use2(i1 %A)
  %B = ashr i32 %z, %x
  %C = select i1 %A, i32 %y, i32 %B
  ret i32 %C
}
=>
define i32 @select_ashr_icmp(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp ne i32 %x, 0
  call void @use2(i1 %A)
  %C = select i1 %A, i32 %y, i32 %z
  ret i32 %C
}
Transformation seems to be correct!


----------------------------------------
define i32 @select_udiv_icmp(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp eq i32 %x, 1
  %B = udiv i32 %z, %x
  %C = select i1 %A, i32 %B, i32 %y
  ret i32 %C
}
=>
define i32 @select_udiv_icmp(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp eq i32 %x, 1
  %C = select i1 %A, i32 %z, i32 %y
  ret i32 %C
}
Transformation seems to be correct!


----------------------------------------
define i32 @select_sdiv_icmp(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp ne i32 %x, 1
  call void @use2(i1 %A)
  %B = sdiv i32 %z, %x
  %C = select i1 %A, i32 %y, i32 %B
  ret i32 %C
}
=>
define i32 @select_sdiv_icmp(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp ne i32 %x, 1
  call void @use2(i1 %A)
  %C = select i1 %A, i32 %y, i32 %z
  ret i32 %C
}
Transformation seems to be correct!


----------------------------------------
define i32 @select_xor_icmp_bad_1(i32 %x, i32 %y, i32 %z, i32 %k) {
%0:
  %A = icmp eq i32 %x, %k
  %B = xor i32 %x, %z
  %C = select i1 %A, i32 %B, i32 %y
  ret i32 %C
}
=>
define i32 @select_xor_icmp_bad_1(i32 %x, i32 %y, i32 %z, i32 %k) {
%0:
  %A = icmp eq i32 %x, %k
  %B = xor i32 %x, %z
  %C = select i1 %A, i32 %B, i32 %y
  ret i32 %C
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
define i32 @select_xor_icmp_bad_2(i32 %x, i32 %y, i32 %z, i32 %k) {
%0:
  %A = icmp eq i32 %x, 0
  %B = xor i32 %k, %z
  %C = select i1 %A, i32 %B, i32 %y
  ret i32 %C
}
=>
define i32 @select_xor_icmp_bad_2(i32 %x, i32 %y, i32 %z, i32 %k) {
%0:
  %A = icmp eq i32 %x, 0
  %B = xor i32 %k, %z
  %C = select i1 %A, i32 %B, i32 %y
  ret i32 %C
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
define i32 @select_xor_icmp_bad_3(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp eq i32 %x, 3
  %B = xor i32 %x, %z
  %C = select i1 %A, i32 %B, i32 %y
  ret i32 %C
}
=>
define i32 @select_xor_icmp_bad_3(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp eq i32 %x, 3
  %B = xor i32 %z, 3
  %C = select i1 %A, i32 %B, i32 %y
  ret i32 %C
}
Transformation seems to be correct!


----------------------------------------
define i32 @select_xor_fcmp_bad_4(i32 %x, i32 %y, i32 %z, float %k) {
%0:
  %A = fcmp oeq float %k, 0.000000
  %B = xor i32 %x, %z
  %C = select i1 %A, i32 %B, i32 %y
  ret i32 %C
}
=>
define i32 @select_xor_fcmp_bad_4(i32 %x, i32 %y, i32 %z, float %k) {
%0:
  %A = fcmp oeq float %k, 0.000000
  %B = xor i32 %x, %z
  %C = select i1 %A, i32 %B, i32 %y
  ret i32 %C
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
define i32 @select_xor_icmp_bad_5(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp ne i32 %x, 0
  %B = xor i32 %x, %z
  %C = select i1 %A, i32 %B, i32 %y
  ret i32 %C
}
=>
define i32 @select_xor_icmp_bad_5(i32 %x, i32 %y, i32 %z) {
%0:
  %A.not = icmp eq i32 %x, 0
  %B = xor i32 %x, %z
  %C = select i1 %A.not, i32 %y, i32 %B
  ret i32 %C
}
Transformation seems to be correct!


----------------------------------------
define i32 @select_xor_icmp_bad_6(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp ne i32 %x, 1
  %B = xor i32 %x, %z
  %C = select i1 %A, i32 %y, i32 %B
  ret i32 %C
}
=>
define i32 @select_xor_icmp_bad_6(i32 %x, i32 %y, i32 %z) {
%0:
  %A.not = icmp eq i32 %x, 1
  %B = xor i32 %z, 1
  %C = select i1 %A.not, i32 %B, i32 %y
  ret i32 %C
}
Transformation seems to be correct!


----------------------------------------
define <2 x i8> @select_xor_icmp_vec_bad(<2 x i8> %x, <2 x i8> %y, <2 x i8> %z) {
%0:
  %A = icmp eq <2 x i8> %x, { 5, 3 }
  %B = xor <2 x i8> %x, %z
  %C = select <2 x i1> %A, <2 x i8> %B, <2 x i8> %y
  ret <2 x i8> %C
}
=>
define <2 x i8> @select_xor_icmp_vec_bad(<2 x i8> %x, <2 x i8> %y, <2 x i8> %z) {
%0:
  %A = icmp eq <2 x i8> %x, { 5, 3 }
  %B = xor <2 x i8> %x, %z
  %C = select <2 x i1> %A, <2 x i8> %B, <2 x i8> %y
  ret <2 x i8> %C
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
define <2 x i32> @vec_select_no_equivalence(<2 x i32> %x) {
%0:
  %x10 = shufflevector <2 x i32> %x, <2 x i32> undef, 1, 0
  %cond = icmp eq <2 x i32> %x, { 0, 0 }
  %s = select <2 x i1> %cond, <2 x i32> %x10, <2 x i32> %x
  ret <2 x i32> %s
}
=>
define <2 x i32> @vec_select_no_equivalence(<2 x i32> %x) {
%0:
  %x10 = shufflevector <2 x i32> %x, <2 x i32> undef, 1, 0
  %cond = icmp eq <2 x i32> %x, { 0, 0 }
  %s = select <2 x i1> %cond, <2 x i32> %x10, <2 x i32> %x
  ret <2 x i32> %s
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
define <2 x i8> @select_xor_icmp_vec_undef(<2 x i8> %x, <2 x i8> %y, <2 x i8> %z) {
%0:
  %A = icmp eq <2 x i8> %x, { 0, undef }
  %B = xor <2 x i8> %x, %z
  %C = select <2 x i1> %A, <2 x i8> %B, <2 x i8> %y
  ret <2 x i8> %C
}
=>
define <2 x i8> @select_xor_icmp_vec_undef(<2 x i8> %x, <2 x i8> %y, <2 x i8> %z) {
%0:
  %A = icmp eq <2 x i8> %x, { 0, undef }
  %B = xor <2 x i8> %x, %z
  %C = select <2 x i1> %A, <2 x i8> %B, <2 x i8> %y
  ret <2 x i8> %C
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
define i32 @select_mul_icmp_bad(i32 %x, i32 %y, i32 %z, i32 %k) {
%0:
  %A = icmp eq i32 %x, 3
  %B = mul i32 %x, %z
  %C = select i1 %A, i32 %B, i32 %y
  ret i32 %C
}
=>
define i32 @select_mul_icmp_bad(i32 %x, i32 %y, i32 %z, i32 %k) {
%0:
  %A = icmp eq i32 %x, 3
  %B = mul i32 %z, 3
  %C = select i1 %A, i32 %B, i32 %y
  ret i32 %C
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define i32 @select_add_icmp_bad(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp eq i32 %x, 1
  %B = add i32 %x, %z
  %C = select i1 %A, i32 %B, i32 %y
  ret i32 %C
}
=>
define i32 @select_add_icmp_bad(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp eq i32 %x, 1
  %B = add i32 %z, 1
  %C = select i1 %A, i32 %B, i32 %y
  ret i32 %C
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define i32 @select_and_icmp_zero(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp eq i32 %x, 0
  %B = and i32 %x, %z
  %C = select i1 %A, i32 %B, i32 %y
  ret i32 %C
}
=>
define i32 @select_and_icmp_zero(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp eq i32 %x, 0
  %C = select i1 %A, i32 0, i32 %y
  ret i32 %C
}
Transformation seems to be correct!


----------------------------------------
define i32 @select_or_icmp_bad(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp eq i32 %x, 3
  %B = or i32 %x, %z
  %C = select i1 %A, i32 %B, i32 %y
  ret i32 %C
}
=>
define i32 @select_or_icmp_bad(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp eq i32 %x, 3
  %B = or i32 %z, 3
  %C = select i1 %A, i32 %B, i32 %y
  ret i32 %C
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define i32 @select_lshr_icmp_const(i32 %x) {
%0:
  %A = icmp ugt i32 %x, 31
  %B = lshr i32 %x, 5
  %C = select i1 %A, i32 %B, i32 0
  ret i32 %C
}
=>
define i32 @select_lshr_icmp_const(i32 %x) {
%0:
  %B = lshr i32 %x, 5
  ret i32 %B
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define i32 @select_lshr_icmp_const_reordered(i32 %x) {
%0:
  %A = icmp ult i32 %x, 32
  %B = lshr i32 %x, 5
  %C = select i1 %A, i32 0, i32 %B
  ret i32 %C
}
=>
define i32 @select_lshr_icmp_const_reordered(i32 %x) {
%0:
  %B = lshr i32 %x, 5
  ret i32 %B
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define i32 @select_exact_lshr_icmp_const(i32 %x) {
%0:
  %A = icmp ugt i32 %x, 31
  %B = lshr exact i32 %x, 5
  %C = select i1 %A, i32 %B, i32 0
  ret i32 %C
}
=>
define i32 @select_exact_lshr_icmp_const(i32 %x) {
%0:
  %B = lshr i32 %x, 5
  ret i32 %B
}
Transformation seems to be correct!


----------------------------------------
define i32 @select_lshr_icmp_const_large_exact_range(i32 %x) {
%0:
  %A = icmp ugt i32 %x, 63
  %B = lshr i32 %x, 5
  %C = select i1 %A, i32 %B, i32 0
  ret i32 %C
}
=>
define i32 @select_lshr_icmp_const_large_exact_range(i32 %x) {
%0:
  %A = icmp ugt i32 %x, 63
  %B = lshr i32 %x, 5
  %C = select i1 %A, i32 %B, i32 0
  ret i32 %C
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
define i32 @select_lshr_icmp_const_different_values(i32 %x, i32 %y) {
%0:
  %A = icmp ugt i32 %x, 31
  %B = lshr i32 %y, 5
  %C = select i1 %A, i32 %B, i32 0
  ret i32 %C
}
=>
define i32 @select_lshr_icmp_const_different_values(i32 %x, i32 %y) {
%0:
  %A = icmp ugt i32 %x, 31
  %B = lshr i32 %y, 5
  %C = select i1 %A, i32 %B, i32 0
  ret i32 %C
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
define float @select_fadd_fcmp_bad(float %x, float %y, float %z) {
%0:
  %A = fcmp oeq float %x, -1.000000
  %B = fadd nsz float %x, %z, exceptions=ignore
  %C = select i1 %A, float %B, float %y
  ret float %C
}
=>
define float @select_fadd_fcmp_bad(float %x, float %y, float %z) {
%0:
  %A = fcmp oeq float %x, -1.000000
  %B = fadd nsz float %x, %z, exceptions=ignore
  %C = select i1 %A, float %B, float %y
  ret float %C
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
define float @select_fadd_fcmp_bad_2(float %x, float %y, float %z) {
%0:
  %A = fcmp ueq float %x, -1.000000
  %B = fadd float %x, %z, exceptions=ignore
  %C = select i1 %A, float %B, float %y
  ret float %C
}
=>
define float @select_fadd_fcmp_bad_2(float %x, float %y, float %z) {
%0:
  %A = fcmp ueq float %x, -1.000000
  %B = fadd float %x, %z, exceptions=ignore
  %C = select i1 %A, float %B, float %y
  ret float %C
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
define float @select_fadd_fcmp_bad_3(float %x, float %y, float %z, float %k) {
%0:
  %A = fcmp one float %x, %k
  %B = fadd float %x, %z, exceptions=ignore
  %C = select i1 %A, float %y, float %B
  ret float %C
}
=>
define float @select_fadd_fcmp_bad_3(float %x, float %y, float %z, float %k) {
%0:
  %A = fcmp one float %x, %k
  %B = fadd float %x, %z, exceptions=ignore
  %C = select i1 %A, float %y, float %B
  ret float %C
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
define float @select_fadd_fcmp_bad_4(float %x, float %y, float %z) {
%0:
  %A = fcmp une float %x, -0.000000
  %B = fadd float %x, %z, exceptions=ignore
  %C = select i1 %A, float %B, float %y
  ret float %C
}
=>
define float @select_fadd_fcmp_bad_4(float %x, float %y, float %z) {
%0:
  %A = fcmp une float %x, 0.000000
  %B = fadd float %x, %z, exceptions=ignore
  %C = select i1 %A, float %B, float %y
  ret float %C
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define float @select_fadd_fcmp_bad_5(float %x, float %y, float %z) {
%0:
  %A = fcmp one float %x, -0.000000
  %B = fadd nsz float %z, %x, exceptions=ignore
  %C = select i1 %A, float %y, float %B
  ret float %C
}
=>
define float @select_fadd_fcmp_bad_5(float %x, float %y, float %z) {
%0:
  %A = fcmp one float %x, 0.000000
  %B = fadd nsz float %z, %x, exceptions=ignore
  %C = select i1 %A, float %y, float %B
  ret float %C
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define float @select_fadd_fcmp_bad_6(float %x, float %y, float %z) {
%0:
  %A = fcmp oeq float %x, -0.000000
  %B = fadd nsz float %z, %x, exceptions=ignore
  %C = select i1 %A, float %y, float %B
  ret float %C
}
=>
define float @select_fadd_fcmp_bad_6(float %x, float %y, float %z) {
%0:
  %A = fcmp oeq float %x, 0.000000
  %B = fadd nsz float %z, %x, exceptions=ignore
  %C = select i1 %A, float %y, float %B
  ret float %C
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define float @select_fadd_fcmp_bad_7(float %x, float %y, float %z) {
%0:
  %A = fcmp oeq float %x, -0.000000
  %B = fadd float %x, %z, exceptions=ignore
  %C = select i1 %A, float %B, float %y
  ret float %C
}
=>
define float @select_fadd_fcmp_bad_7(float %x, float %y, float %z) {
%0:
  %A = fcmp oeq float %x, 0.000000
  %B = fadd float %x, %z, exceptions=ignore
  %C = select i1 %A, float %B, float %y
  ret float %C
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define float @select_fadd_fcmp_bad_8(float %x, float %y, float %v) {
%0:
  %A = fcmp one float %x, -0.000000
  %z = fadd float %v, -1.000000, exceptions=ignore
  %B = fadd float %z, %x, exceptions=ignore
  %C = select i1 %A, float %y, float %B
  ret float %C
}
=>
define float @select_fadd_fcmp_bad_8(float %x, float %y, float %v) {
%0:
  %A = fcmp one float %x, 0.000000
  %z = fadd float %v, -1.000000, exceptions=ignore
  %B = fadd float %z, %x, exceptions=ignore
  %C = select i1 %A, float %y, float %B
  ret float %C
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define float @select_fadd_fcmp_bad_9(float %x, float %y, float %z) {
%0:
  %A = fcmp one float %x, -0.000000
  %B = fadd nsz float %z, %x, exceptions=ignore
  %C = select i1 %A, float %y, float %B
  ret float %C
}
=>
define float @select_fadd_fcmp_bad_9(float %x, float %y, float %z) {
%0:
  %A = fcmp one float %x, 0.000000
  %B = fadd nsz float %z, %x, exceptions=ignore
  %C = select i1 %A, float %y, float %B
  ret float %C
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define float @select_fadd_fcmp_bad_10(float %x, float %y, float %v) {
%0:
  %A = fcmp one float %x, -0.000000
  %z = fadd float %v, 0.000000, exceptions=ignore
  %B = fadd float %z, %x, exceptions=ignore
  %C = select i1 %A, float %y, float %B
  ret float %C
}
=>
define float @select_fadd_fcmp_bad_10(float %x, float %y, float %v) {
%0:
  %A = fcmp one float %x, 0.000000
  %z = fadd float %v, 0.000000, exceptions=ignore
  %B = fadd float %z, %x, exceptions=ignore
  %C = select i1 %A, float %y, float %B
  ret float %C
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define float @select_fadd_fcmp_bad_11(float %x, float %y, float %v) {
%0:
  %A = fcmp une float %x, -0.000000
  %z = fadd float %v, -1.000000, exceptions=ignore
  %B = fadd nsz float %z, %x, exceptions=ignore
  %C = select i1 %A, float %y, float %B
  ret float %C
}
=>
define float @select_fadd_fcmp_bad_11(float %x, float %y, float %v) {
%0:
  %A = fcmp une float %x, 0.000000
  %z = fadd float %v, -1.000000, exceptions=ignore
  %C = select i1 %A, float %y, float %z
  ret float %C
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define float @select_fadd_fcmp_bad_12(float %x, float %y, float %z) {
%0:
  %A = fcmp une float %x, -0.000000
  %B = fadd float %z, %x, exceptions=ignore
  %C = select i1 %A, float %y, float %B
  ret float %C
}
=>
define float @select_fadd_fcmp_bad_12(float %x, float %y, float %z) {
%0:
  %A = fcmp une float %x, 0.000000
  %B = fadd float %z, %x, exceptions=ignore
  %C = select i1 %A, float %y, float %B
  ret float %C
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define float @select_fadd_fcmp_bad_13(float %x, float %y, float %z) {
%0:
  %A = fcmp oeq float %x, -0.000000
  %B = fadd nsz float %x, %z, exceptions=ignore
  %C = select i1 %A, float %y, float %B
  ret float %C
}
=>
define float @select_fadd_fcmp_bad_13(float %x, float %y, float %z) {
%0:
  %A = fcmp oeq float %x, 0.000000
  %B = fadd nsz float %x, %z, exceptions=ignore
  %C = select i1 %A, float %y, float %B
  ret float %C
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define float @select_fadd_fcmp_bad_14(float %x, float %y, float %z) {
%0:
  %A = fcmp une float %x, -1.000000
  %B = fadd nsz float %x, %z, exceptions=ignore
  %C = select i1 %A, float %y, float %B
  ret float %C
}
=>
define float @select_fadd_fcmp_bad_14(float %x, float %y, float %z) {
%0:
  %A = fcmp une float %x, -1.000000
  %B = fadd nsz float %x, %z, exceptions=ignore
  %C = select i1 %A, float %y, float %B
  ret float %C
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
define float @select_fmul_fcmp_bad(float %x, float %y, float %z) {
%0:
  %A = fcmp oeq float %x, 3.000000
  %B = fmul nsz float %x, %z, exceptions=ignore
  %C = select i1 %A, float %B, float %y
  ret float %C
}
=>
define float @select_fmul_fcmp_bad(float %x, float %y, float %z) {
%0:
  %A = fcmp oeq float %x, 3.000000
  %B = fmul nsz float %x, %z, exceptions=ignore
  %C = select i1 %A, float %B, float %y
  ret float %C
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
define float @select_fmul_fcmp_bad_2(float %x, float %y, float %z) {
%0:
  %A = fcmp oeq float %x, 1.000000
  %B = fmul float %x, %z, exceptions=ignore
  %C = select i1 %A, float %B, float %y
  ret float %C
}
=>
define float @select_fmul_fcmp_bad_2(float %x, float %y, float %z) {
%0:
  %A = fcmp oeq float %x, 1.000000
  %B = fmul float %x, %z, exceptions=ignore
  %C = select i1 %A, float %B, float %y
  ret float %C
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
define float @select_fmul_icmp_bad(float %x, float %y, float %z, i32 %k) {
%0:
  %A = icmp eq i32 %k, 0
  %B = fmul float %x, %z, exceptions=ignore
  %C = select i1 %A, float %B, float %y
  ret float %C
}
=>
define float @select_fmul_icmp_bad(float %x, float %y, float %z, i32 %k) {
%0:
  %A = icmp eq i32 %k, 0
  %B = fmul float %x, %z, exceptions=ignore
  %C = select i1 %A, float %B, float %y
  ret float %C
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
define float @select_fmul_icmp_bad_2(float %x, float %y, float %z, i32 %k) {
%0:
  %A = icmp eq i32 %k, 0
  %B = fmul nsz float %x, %z, exceptions=ignore
  %C = select i1 %A, float %B, float %y
  ret float %C
}
=>
define float @select_fmul_icmp_bad_2(float %x, float %y, float %z, i32 %k) {
%0:
  %A = icmp eq i32 %k, 0
  %B = fmul nsz float %x, %z, exceptions=ignore
  %C = select i1 %A, float %B, float %y
  ret float %C
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
define float @select_fdiv_fcmp_bad(float %x, float %y, float %z) {
%0:
  %A = fcmp oeq float %x, 1.000000
  %B = fdiv float %x, %z, exceptions=ignore
  %C = select i1 %A, float %B, float %y
  ret float %C
}
=>
define float @select_fdiv_fcmp_bad(float %x, float %y, float %z) {
%0:
  %A = fcmp oeq float %x, 1.000000
  %B = fdiv float %x, %z, exceptions=ignore
  %C = select i1 %A, float %B, float %y
  ret float %C
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
define float @select_fdiv_fcmp_bad_2(float %x, float %y, float %z) {
%0:
  %A = fcmp oeq float %x, 3.000000
  %B = fdiv nsz float %x, %z, exceptions=ignore
  %C = select i1 %A, float %B, float %y
  ret float %C
}
=>
define float @select_fdiv_fcmp_bad_2(float %x, float %y, float %z) {
%0:
  %A = fcmp oeq float %x, 3.000000
  %B = fdiv nsz float %x, %z, exceptions=ignore
  %C = select i1 %A, float %B, float %y
  ret float %C
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
define float @select_fsub_fcmp_bad(float %x, float %y, float %z) {
%0:
  %A = fcmp oeq float %x, 0.000000
  %B = fsub float %z, %x, exceptions=ignore
  %C = select i1 %A, float %B, float %y
  ret float %C
}
=>
define float @select_fsub_fcmp_bad(float %x, float %y, float %z) {
%0:
  %A = fcmp oeq float %x, 0.000000
  %B = fsub float %z, %x, exceptions=ignore
  %C = select i1 %A, float %B, float %y
  ret float %C
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
define float @select_fsub_fcmp_bad_2(float %x, float %y, float %z) {
%0:
  %A = fcmp oeq float %x, 1.000000
  %B = fsub nsz float %z, %x, exceptions=ignore
  %C = select i1 %A, float %B, float %y
  ret float %C
}
=>
define float @select_fsub_fcmp_bad_2(float %x, float %y, float %z) {
%0:
  %A = fcmp oeq float %x, 1.000000
  %B = fsub nsz float %z, %x, exceptions=ignore
  %C = select i1 %A, float %B, float %y
  ret float %C
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
define i32 @select_sub_icmp_bad(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp eq i32 %x, 0
  %B = sub i32 %x, %z
  %C = select i1 %A, i32 %B, i32 %y
  ret i32 %C
}
=>
define i32 @select_sub_icmp_bad(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp eq i32 %x, 0
  %B = sub i32 0, %z
  %C = select i1 %A, i32 %B, i32 %y
  ret i32 %C
}
Transformation seems to be correct!


----------------------------------------
define i32 @select_sub_icmp_bad_2(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp eq i32 %x, 1
  %B = sub i32 %z, %x
  %C = select i1 %A, i32 %B, i32 %y
  ret i32 %C
}
=>
define i32 @select_sub_icmp_bad_2(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp eq i32 %x, 1
  %B = add i32 %z, 4294967295
  %C = select i1 %A, i32 %B, i32 %y
  ret i32 %C
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define i32 @select_sub_icmp_bad_3(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp ne i32 %x, 0
  call void @use2(i1 %A)
  %B = sub i32 %z, %x
  %C = select i1 %A, i32 %B, i32 %y
  ret i32 %C
}
=>
define i32 @select_sub_icmp_bad_3(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp ne i32 %x, 0
  call void @use2(i1 %A)
  %B = sub i32 %z, %x
  %C = select i1 %A, i32 %B, i32 %y
  ret i32 %C
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
define i32 @select_sub_icmp_4(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp ne i32 %x, 0
  call void @use2(i1 %A)
  %B = sub i32 %z, %x
  %C = select i1 %A, i32 %B, i32 %y
  ret i32 %C
}
=>
define i32 @select_sub_icmp_4(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp ne i32 %x, 0
  call void @use2(i1 %A)
  %B = sub i32 %z, %x
  %C = select i1 %A, i32 %B, i32 %y
  ret i32 %C
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
define i32 @select_sub_icmp_bad_4(i32 %x, i32 %y, i32 %z, i32 %k) {
%0:
  %A = icmp eq i32 %x, 0
  %B = sub i32 %z, %k
  %C = select i1 %A, i32 %B, i32 %y
  ret i32 %C
}
=>
define i32 @select_sub_icmp_bad_4(i32 %x, i32 %y, i32 %z, i32 %k) {
%0:
  %A = icmp eq i32 %x, 0
  %B = sub i32 %z, %k
  %C = select i1 %A, i32 %B, i32 %y
  ret i32 %C
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
define i32 @select_sub_icmp_bad_5(i32 %x, i32 %y, i32 %z, i32 %k) {
%0:
  %A = icmp eq i32 %x, %k
  %B = sub i32 %z, %x
  %C = select i1 %A, i32 %B, i32 %y
  ret i32 %C
}
=>
define i32 @select_sub_icmp_bad_5(i32 %x, i32 %y, i32 %z, i32 %k) {
%0:
  %A = icmp eq i32 %x, %k
  %B = sub i32 %z, %x
  %C = select i1 %A, i32 %B, i32 %y
  ret i32 %C
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
define i32 @select_shl_icmp_bad(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp eq i32 %x, 1
  %B = shl i32 %z, %x
  %C = select i1 %A, i32 %B, i32 %y
  ret i32 %C
}
=>
define i32 @select_shl_icmp_bad(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp eq i32 %x, 1
  %B = shl i32 %z, 1
  %C = select i1 %A, i32 %B, i32 %y
  ret i32 %C
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define i32 @select_lshr_icmp_bad(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp eq i32 %x, 1
  %B = lshr i32 %z, %x
  %C = select i1 %A, i32 %B, i32 %y
  ret i32 %C
}
=>
define i32 @select_lshr_icmp_bad(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp eq i32 %x, 1
  %B = lshr i32 %z, 1
  %C = select i1 %A, i32 %B, i32 %y
  ret i32 %C
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define i32 @select_ashr_icmp_bad(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp eq i32 %x, 1
  %B = ashr i32 %z, %x
  %C = select i1 %A, i32 %B, i32 %y
  ret i32 %C
}
=>
define i32 @select_ashr_icmp_bad(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp eq i32 %x, 1
  %B = ashr i32 %z, 1
  %C = select i1 %A, i32 %B, i32 %y
  ret i32 %C
}
Transformation seems to be correct!


----------------------------------------
define i32 @select_udiv_icmp_bad(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp eq i32 %x, 3
  %B = udiv i32 %z, %x
  %C = select i1 %A, i32 %B, i32 %y
  ret i32 %C
}
=>
define i32 @select_udiv_icmp_bad(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp eq i32 %x, 3
  %B = udiv i32 %z, %x
  %C = select i1 %A, i32 %B, i32 %y
  ret i32 %C
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
define i32 @select_sdiv_icmp_bad(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp eq i32 %x, 3
  %B = sdiv i32 %z, %x
  %C = select i1 %A, i32 %B, i32 %y
  ret i32 %C
}
=>
define i32 @select_sdiv_icmp_bad(i32 %x, i32 %y, i32 %z) {
%0:
  %A = icmp eq i32 %x, 3
  %B = sdiv i32 %z, %x
  %C = select i1 %A, i32 %B, i32 %y
  ret i32 %C
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
define i32 @select_replace_one_use(i32 %x, i32 %y) {
%0:
  %c = icmp eq i32 %x, 0
  %sub = sub i32 %x, %y
  %s = select i1 %c, i32 %sub, i32 %y
  ret i32 %s
}
=>
define i32 @select_replace_one_use(i32 %x, i32 %y) {
%0:
  %c = icmp eq i32 %x, 0
  %sub = sub i32 0, %y
  %s = select i1 %c, i32 %sub, i32 %y
  ret i32 %s
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define i32 @select_replace_multi_use(i32 %x, i32 %y) {
%0:
  %c = icmp eq i32 %x, 0
  %sub = sub i32 %x, %y
  call void @use_i32(i32 %sub)
  %s = select i1 %c, i32 %sub, i32 %y
  ret i32 %s
}
=>
define i32 @select_replace_multi_use(i32 %x, i32 %y) {
%0:
  %c = icmp eq i32 %x, 0
  %sub = sub i32 %x, %y
  call void @use_i32(i32 %sub)
  %s = select i1 %c, i32 %sub, i32 %y
  ret i32 %s
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
define i32 @select_replace_fold(i32 %x, i32 %y, i32 %z) {
%0:
  %c = icmp eq i32 %x, 0
  %fshr = fshr i32 %y, i32 %z, i32 %x
  %s = select i1 %c, i32 %fshr, i32 %y
  ret i32 %s
}
=>
define i32 @select_replace_fold(i32 %x, i32 %y, i32 %z) {
%0:
  %c = icmp eq i32 %x, 0
  %s = select i1 %c, i32 %z, i32 %y
  ret i32 %s
}
Transformation seems to be correct!


----------------------------------------
define i32 @select_replace_nested(i32 %x, i32 %y, i32 %z) {
%0:
  %c = icmp eq i32 %x, 0
  %sub = sub i32 %y, %x
  %add = add i32 %sub, %z
  %s = select i1 %c, i32 %add, i32 %y
  ret i32 %s
}
=>
define i32 @select_replace_nested(i32 %x, i32 %y, i32 %z) {
%0:
  %c = icmp eq i32 %x, 0
  %sub = sub i32 %y, %x
  %add = add i32 %sub, %z
  %s = select i1 %c, i32 %add, i32 %y
  ret i32 %s
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
@g = global 4 bytes, align 4

define i32 @select_replace_constexpr(i32 %x, i32 %y, i32 %z) {
%0:
  %__constexpr_0 = ptrtoint * @g to i32
  %c = icmp eq i32 %x, %__constexpr_0
  %add = add i32 %x, %y
  %s = select i1 %c, i32 %add, i32 %z
  ret i32 %s
}
=>
@g = global 4 bytes, align 4

define i32 @select_replace_constexpr(i32 %x, i32 %y, i32 %z) {
%0:
  %__constexpr_0 = ptrtoint * @g to i32
  %c = icmp eq i32 %x, %__constexpr_0
  %add = add i32 %x, %y
  %s = select i1 %c, i32 %add, i32 %z
  ret i32 %s
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
define <2 x i32> @select_replace_undef(<2 x i32> %x, <2 x i32> %y) {
%0:
  %c = icmp eq <2 x i32> %x, { 0, undef }
  %sub = sub <2 x i32> %x, %y
  %s = select <2 x i1> %c, <2 x i32> %sub, <2 x i32> %y
  ret <2 x i32> %s
}
=>
define <2 x i32> @select_replace_undef(<2 x i32> %x, <2 x i32> %y) {
%0:
  %c = icmp eq <2 x i32> %x, { 0, undef }
  %sub = sub <2 x i32> %x, %y
  %s = select <2 x i1> %c, <2 x i32> %sub, <2 x i32> %y
  ret <2 x i32> %s
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
define i32 @select_replace_call_speculatable(i32 %x, i32 %y) {
%0:
  %c = icmp eq i32 %x, 0
  %call = call i32 @call_speculatable(i32 %x, i32 %x)
  %s = select i1 %c, i32 %call, i32 %y
  ret i32 %s
}
=>
define i32 @select_replace_call_speculatable(i32 %x, i32 %y) {
%0:
  %c = icmp eq i32 %x, 0
  %call = call i32 @call_speculatable(i32 0, i32 0)
  %s = select i1 %c, i32 %call, i32 %y
  ret i32 %s
}
Transformation doesn't verify!
ERROR: Source is more defined than target

Example:
i32 %x = #xffffffff (4294967295, -1)
i32 %y = poison

Source:
i1 %c = #x0 (0)
i32 %call = poison
i32 %s = poison

SOURCE MEMORY STATE
===================
NON-LOCAL BLOCKS:
Block 0 >	size: 0	align: 1	alloc type: 0
Block 1 >	size: 0	align: 1

Target:
i1 %c = #x0 (0)
i32 %call = UB triggered!



------------------- SMT STATS -------------------
Num queries: 388
Num invalid: 0
Num skips:   0
Num trivial: 146 (27.3%)
Num timeout: 32 (8.2%)
Num errors:  0 (0.0%)
Num SAT:     196 (50.5%)
Num UNSAT:   160 (41.2%)
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-binop-cmp.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-binop-cmp.ll

 

<-- Back