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

Test source: git

Log:

Source: <stdin>

----------------------------------------
define float @foo1(float %a) {
%0:
  %b = fcmp ogt float %a, 0.000000
  %c = select i1 %b, float %a, float 0.000000
  %d = fcmp olt float %c, 1.000000
  %f = select i1 %d, float %c, float 1.000000
  ret float %f
}
=>
define float @foo1(float %a) {
%0:
  %b = fcmp ogt float %a, 0.000000
  %c = select i1 %b, float %a, float 0.000000
  %d = fcmp olt float %c, 1.000000
  %f = select i1 %d, float %c, float 1.000000
  ret float %f
}
Transformation seems to be correct!


----------------------------------------
define float @foo2(float %a) {
%0:
  %b = fcmp ogt float %a, 0.000000
  %c = select i1 %b, float %a, float 0.000000
  %d = fcmp olt float %c, 1.000000
  %e = select i1 %b, float %a, float 0.000000
  %f = select i1 %d, float %e, float 1.000000
  ret float %f
}
=>
define float @foo2(float %a) {
%0:
  %b = fcmp ogt float %a, 0.000000
  %c = select i1 %b, float %a, float 0.000000
  %d = fcmp olt float %c, 1.000000
  %e = select i1 %b, float %a, float 0.000000
  %f = select i1 %d, float %e, float 1.000000
  ret float %f
}
Transformation seems to be correct!


----------------------------------------
define <2 x i32> @foo3(<2 x i1> %vec_bool, i1 %bool, <2 x i32> %V) {
%0:
  %sel0 = select <2 x i1> %vec_bool, <2 x i32> { 0, 0 }, <2 x i32> %V
  %sel1 = select i1 %bool, <2 x i32> %sel0, <2 x i32> %V
  ret <2 x i32> %sel1
}
=>
define <2 x i32> @foo3(<2 x i1> %vec_bool, i1 %bool, <2 x i32> %V) {
%0:
  %sel0 = select <2 x i1> %vec_bool, <2 x i32> { 0, 0 }, <2 x i32> %V
  %sel1 = select i1 %bool, <2 x i32> %sel0, <2 x i32> %V
  ret <2 x i32> %sel1
}
Transformation seems to be correct!


----------------------------------------
define <4 x i8> @sel_shuf_commute0(<4 x i8> %x, <4 x i8> %y, <4 x i1> %cmp) {
%0:
  %blend = shufflevector <4 x i8> %x, <4 x i8> %y, 0, 5, 2, 7
  %r = select <4 x i1> %cmp, <4 x i8> %blend, <4 x i8> %x
  ret <4 x i8> %r
}
=>
define <4 x i8> @sel_shuf_commute0(<4 x i8> %x, <4 x i8> %y, <4 x i1> %cmp) {
%0:
  %sel = select <4 x i1> %cmp, <4 x i8> %y, <4 x i8> %x
  %r = shufflevector <4 x i8> %x, <4 x i8> %sel, 0, 5, 2, 7
  ret <4 x i8> %r
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define <5 x i9> @sel_shuf_commute1(<5 x i9> %x, <5 x i9> %y, <5 x i1> %cmp) {
%0:
  %blend = shufflevector <5 x i9> %x, <5 x i9> %y, 0, 6, 2, 8, 9
  %r = select <5 x i1> %cmp, <5 x i9> %blend, <5 x i9> %y
  ret <5 x i9> %r
}
=>
define <5 x i9> @sel_shuf_commute1(<5 x i9> %x, <5 x i9> %y, <5 x i1> %cmp) {
%0:
  %sel = select <5 x i1> %cmp, <5 x i9> %x, <5 x i9> %y
  %r = shufflevector <5 x i9> %sel, <5 x i9> %y, 0, 6, 2, 8, 9
  ret <5 x i9> %r
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define <4 x float> @sel_shuf_commute2(<4 x float> %x, <4 x float> %y, <4 x i1> %cmp) {
%0:
  %blend = shufflevector <4 x float> %x, <4 x float> %y, 0, 1, 2, 7
  %r = select <4 x i1> %cmp, <4 x float> %x, <4 x float> %blend
  ret <4 x float> %r
}
=>
define <4 x float> @sel_shuf_commute2(<4 x float> %x, <4 x float> %y, <4 x i1> %cmp) {
%0:
  %sel = select <4 x i1> %cmp, <4 x float> %x, <4 x float> %y
  %r = shufflevector <4 x float> %x, <4 x float> %sel, 0, 1, 2, 7
  ret <4 x float> %r
}
Transformation seems to be correct!


----------------------------------------
define <4 x i8> @sel_shuf_commute3(<4 x i8> %x, <4 x i8> %y, i1 %cmp) {
%0:
  %blend = shufflevector <4 x i8> %x, <4 x i8> %y, 0, 5, 2, 3
  %r = select i1 %cmp, <4 x i8> %y, <4 x i8> %blend
  ret <4 x i8> %r
}
=>
define <4 x i8> @sel_shuf_commute3(<4 x i8> %x, <4 x i8> %y, i1 %cmp) {
%0:
  %sel = select i1 %cmp, <4 x i8> %y, <4 x i8> %x
  %r = shufflevector <4 x i8> %sel, <4 x i8> %y, 0, 5, 2, 3
  ret <4 x i8> %r
}
Transformation doesn't verify!
ERROR: Target is more poisonous than source

Example:
<4 x i8> %x = < poison, poison, poison, any >
<4 x i8> %y = < poison, poison, any, poison >
i1 %cmp = undef

Source:
<4 x i8> %blend = < poison, poison, poison, any >
<4 x i8> %r = < poison, poison, poison, poison >

Target:
<4 x i8> %sel = < poison, poison, poison, any >
<4 x i8> %r = < poison, poison, poison, poison >
Source value: < poison, poison, poison, poison >
Target value: < poison, poison, poison, poison >


------------------- SMT STATS -------------------
Num queries: 30
Num invalid: 0
Num skips:   0
Num trivial: 18 (37.5%)
Num timeout: 2 (6.7%)
Num errors:  0 (0.0%)
Num SAT:     8 (26.7%)
Num UNSAT:   20 (66.7%)

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

 

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

 

<-- Back