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, undef, poison >

Source:
<4 x float> %s1 = < any, any, any, any >
<4 x i32> %bc = < #x7f800000 (2139095040)	[based on undef value], #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 = < #x7f802000 (2139103232), #x7f800010 (2139095056), #x7f900000 (2140143616), #x7f804000 (2139111424) >
Source value: < #x7f800000 (2139095040), #x7f800000 (2139095040), #x7f800000 (2139095040), #x7f800000 (2139095040) >
Target value: < #x7f802000 (2139103232), #x7f800010 (2139095056), #x7f900000 (2140143616), #x7f804000 (2139111424) >


------------------- SMT STATS -------------------
Num queries: 22
Num invalid: 0
Num skips:   0
Num trivial: 13 (37.1%)
Num timeout: 2 (9.1%)
Num errors:  0 (0.0%)
Num SAT:     8 (36.4%)
Num UNSAT:   12 (54.5%)

stderr:

+ : 'RUN: at line 2'
+ /home/nlopes/alive2/build/opt-alive.sh -instcombine -S
+ /home/nlopes/llvm/build/bin/FileCheck --allow-unused-prefixes=false /home/nlopes/llvm/llvm/test/Transforms/InstCombine/shufflevec-bitcast.ll

Alive2: Transform doesn't verify; aborting!
FileCheck error: '<stdin>' is empty.
FileCheck command line:  /home/nlopes/llvm/build/bin/FileCheck --allow-unused-prefixes=false /home/nlopes/llvm/llvm/test/Transforms/InstCombine/shufflevec-bitcast.ll

 

<-- Back