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! (syntactically equal)


----------------------------------------
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! (syntactically equal)


----------------------------------------
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! (syntactically equal)


----------------------------------------
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: 38
Num invalid: 0
Num skips:   0
Num trivial: 14 (26.9%)
Num timeout: 2 (5.3%)
Num errors:  0 (0.0%)
Num SAT:     25 (65.8%)
Num UNSAT:   11 (28.9%)
Alive2: Transform doesn't verify; aborting!

stderr:

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

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

 

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

 

<-- Back