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

Test source: git

Log:

Source: <stdin>

----------------------------------------
define <2 x i8> @narrow_shuffle_of_select(<2 x i1> %cmp, <4 x i8> %x, <4 x i8> %y) {
%0:
  %widecmp = shufflevector <2 x i1> %cmp, <2 x i1> undef, 0, 1, 4294967295, 4294967295
  %widesel = select <4 x i1> %widecmp, <4 x i8> %x, <4 x i8> %y
  %r = shufflevector <4 x i8> %widesel, <4 x i8> undef, 0, 1
  ret <2 x i8> %r
}
=>
define <2 x i8> @narrow_shuffle_of_select(<2 x i1> %cmp, <4 x i8> %x, <4 x i8> %y) {
%0:
  %1 = shufflevector <4 x i8> %x, <4 x i8> poison, 0, 1
  %2 = shufflevector <4 x i8> %y, <4 x i8> poison, 0, 1
  %r = select <2 x i1> %cmp, <2 x i8> %1, <2 x i8> %2
  ret <2 x i8> %r
}
Transformation seems to be correct!


----------------------------------------
define <2 x i8> @narrow_shuffle_of_select_overspecified_extend(<2 x i1> %cmp, <4 x i8> %x, <4 x i8> %y) {
%0:
  %widecmp = shufflevector <2 x i1> %cmp, <2 x i1> undef, 0, 1, 0, 1
  %widesel = select <4 x i1> %widecmp, <4 x i8> %x, <4 x i8> %y
  %r = shufflevector <4 x i8> %widesel, <4 x i8> undef, 0, 1
  ret <2 x i8> %r
}
=>
define <2 x i8> @narrow_shuffle_of_select_overspecified_extend(<2 x i1> %cmp, <4 x i8> %x, <4 x i8> %y) {
%0:
  %1 = shufflevector <4 x i8> %x, <4 x i8> poison, 0, 1
  %2 = shufflevector <4 x i8> %y, <4 x i8> poison, 0, 1
  %r = select <2 x i1> %cmp, <2 x i8> %1, <2 x i8> %2
  ret <2 x i8> %r
}
Transformation seems to be correct!


----------------------------------------
define <3 x float> @narrow_shuffle_of_select_undefs(<3 x i1> %cmp, <4 x float> %x, <4 x float> %y) {
%0:
  %widecmp = shufflevector <3 x i1> %cmp, <3 x i1> undef, 4294967295, 1, 2, 4294967295
  %widesel = select <4 x i1> %widecmp, <4 x float> %x, <4 x float> %y
  %r = shufflevector <4 x float> %widesel, <4 x float> undef, 0, 1, 4294967295
  ret <3 x float> %r
}
=>
define <3 x float> @narrow_shuffle_of_select_undefs(<3 x i1> %cmp, <4 x float> %x, <4 x float> %y) {
%0:
  %1 = shufflevector <4 x float> %x, <4 x float> poison, 0, 1, 4294967295
  %2 = shufflevector <4 x float> %y, <4 x float> poison, 0, 1, 4294967295
  %r = select <3 x i1> %cmp, <3 x float> %1, <3 x float> %2
  ret <3 x float> %r
}
Transformation doesn't verify!
ERROR: Target is more poisonous than source

Example:
<3 x i1> %cmp = < #x0 (0), poison, poison >
<4 x float> %x = < poison, poison, poison, poison >
<4 x float> %y = < poison, poison, poison, poison >

Source:
<4 x i1> %widecmp = < #x0 (0)	[based on undef value], poison, poison, #x0 (0)	[based on undef value] >
<4 x float> %widesel = < poison, poison, poison, poison >
<3 x float> %r = < poison, poison, NaN	[based on undef value] >

Target:
<3 x float> %1 = < poison, poison, NaN	[based on undef value] >
<3 x float> %2 = < poison, poison, NaN	[based on undef value] >
<3 x float> %r = < poison, poison, poison >
Source value: < poison, poison, NaN >
Target value: < poison, poison, poison >


------------------- SMT STATS -------------------
Num queries: 32
Num invalid: 0
Num skips:   0
Num trivial: 15 (31.9%)
Num timeout: 0 (0.0%)
Num errors:  0 (0.0%)
Num SAT:     26 (81.2%)
Num UNSAT:   6 (18.8%)
Alive2: Transform doesn't verify; aborting!

stderr:

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

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

 

<-- Back