Test Failure: Transforms/InstCombine/shufflevec-bitcast.ll

Test source: git

Log:

Source: <stdin>

----------------------------------------
define void @test(<16 x i8> %w, * %o1, * %o2) {
%0:
  %v = shufflevector <16 x i8> %w, <16 x i8> undef, 12, 13, 14, 15
  %f = bitcast <4 x i8> %v to float
  %i = bitcast <4 x i8> %v to i32
  store i32 %i, * %o1, align 4
  store float %f, * %o2, align 4
  ret void
}
=>
define void @test(<16 x i8> %w, * %o1, * %o2) {
%0:
  %v.bc = bitcast <16 x i8> %w to <4 x i32>
  %v.extract = extractelement <4 x i32> %v.bc, i32 3
  %v.bc1 = bitcast <16 x i8> %w to <4 x float>
  %v.extract2 = extractelement <4 x float> %v.bc1, i32 3
  store i32 %v.extract, * %o1, align 4
  store float %v.extract2, * %o2, align 4
  ret void
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define <4 x i16> @splat_bitcast_operand(<8 x i8> %x) {
%0:
  %s1 = shufflevector <8 x i8> %x, <8 x i8> undef, 1, 1, 1, 1, 1, 1, 1, 1
  %bc = bitcast <8 x i8> %s1 to <4 x i16>
  %s2 = shufflevector <4 x i16> %bc, <4 x i16> undef, 0, 2, 1, 0
  ret <4 x i16> %s2
}
=>
define <4 x i16> @splat_bitcast_operand(<8 x i8> %x) {
%0:
  %s1 = shufflevector <8 x i8> %x, <8 x i8> undef, 1, 1, 1, 1, 1, 1, 1, 1
  %s2 = bitcast <8 x i8> %s1 to <4 x i16>
  ret <4 x i16> %s2
}
Transformation seems to be correct!


----------------------------------------
define <4 x i16> @splat_bitcast_operand_uses(<8 x i8> %x) {
%0:
  %s1 = shufflevector <8 x i8> %x, <8 x i8> undef, 1, 1, 1, 1, 1, 1, 1, 1
  %bc = bitcast <8 x i8> %s1 to <4 x i16>
  call void @use(<4 x i16> %bc)
  %s2 = shufflevector <4 x i16> %bc, <4 x i16> undef, 0, 2, 1, 0
  ret <4 x i16> %s2
}
=>
define <4 x i16> @splat_bitcast_operand_uses(<8 x i8> %x) {
%0:
  %s1 = shufflevector <8 x i8> %x, <8 x i8> undef, 1, 1, 1, 1, 1, 1, 1, 1
  %bc = bitcast <8 x i8> %s1 to <4 x i16>
  call void @use(<4 x i16> %bc)
  %s2 = bitcast <8 x i8> %s1 to <4 x i16>
  ret <4 x i16> %s2
}
Transformation seems to be correct!


----------------------------------------
define <4 x i32> @splat_bitcast_operand_same_size_src_elt(<4 x float> %x) {
%0:
  %s1 = shufflevector <4 x float> %x, <4 x float> undef, 2, 2, 2, 2
  %bc = bitcast <4 x float> %s1 to <4 x i32>
  %s2 = shufflevector <4 x i32> %bc, <4 x i32> undef, 0, 2, 1, 0
  ret <4 x i32> %s2
}
=>
define <4 x i32> @splat_bitcast_operand_same_size_src_elt(<4 x float> %x) {
%0:
  %s1 = shufflevector <4 x float> %x, <4 x float> undef, 2, 2, 2, 2
  %s2 = bitcast <4 x float> %s1 to <4 x i32>
  ret <4 x i32> %s2
}
Transformation doesn't verify!
ERROR: Value mismatch

Example:
<4 x float> %x = < poison, poison, NaN, poison >

Source:
<4 x float> %s1 = < NaN, NaN, NaN, NaN >
<4 x i32> %bc = < #x7f800000 (2139095040), #x7f800000 (2139095040), #x7f800000 (2139095040), #x7f800000 (2139095040) >
<4 x i32> %s2 = < #x7f800000 (2139095040), #x7f800000 (2139095040), #x7f800000 (2139095040), #x7f800000 (2139095040) >

Target:
<4 x float> %s1 = < NaN, NaN, NaN, NaN >
<4 x i32> %s2 = < #x7f800800 (2139097088), #x7f800004 (2139095044), #x7f840000 (2139357184), #x7f801000 (2139099136) >
Source value: < #x7f800000 (2139095040), #x7f800000 (2139095040), #x7f800000 (2139095040), #x7f800000 (2139095040) >
Target value: < #x7f800800 (2139097088), #x7f800004 (2139095044), #x7f840000 (2139357184), #x7f801000 (2139099136) >


------------------- SMT STATS -------------------
Num queries: 21
Num invalid: 0
Num skips:   0
Num trivial: 42 (66.7%)
Num timeout: 1 (4.8%)
Num errors:  0 (0.0%)
Num SAT:     12 (57.1%)
Num UNSAT:   8 (38.1%)
Alive2: Transform doesn't verify; aborting!

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/shufflevec-bitcast.ll

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

 

<-- Back