Test Failure: Transforms/InstCombine/bswap-inseltpoison.ll

Test source: git

Log:

Source: <stdin>

----------------------------------------
define i32 @shuf_4bytes(<4 x i8> %x) {
%0:
  %bswap = shufflevector <4 x i8> %x, <4 x i8> poison, 3, 2, 1, 0
  %cast = bitcast <4 x i8> %bswap to i32
  ret i32 %cast
}
=>
define i32 @shuf_4bytes(<4 x i8> %x) {
%0:
  %1 = bitcast <4 x i8> %x to i32
  %cast = bswap i32 %1
  ret i32 %cast
}
Transformation seems to be correct!


----------------------------------------
define i32 @shuf_load_4bytes(ptr %p) {
%0:
  %x = load <4 x i8>, ptr %p, align 4
  %bswap = shufflevector <4 x i8> %x, <4 x i8> poison, 3, 2, 4294967295, 0
  %cast = bitcast <4 x i8> %bswap to i32
  ret i32 %cast
}
=>
define i32 @shuf_load_4bytes(ptr %p) {
%0:
  %1 = bitcast ptr %p to ptr
  %x1 = load i32, ptr %1, align 4
  %cast = bswap i32 %x1
  ret i32 %cast
}
Transformation doesn't verify!
ERROR: Target is more poisonous than source

Example:
ptr %p = pointer(non-local, block_id=1, offset=0)

Source:
<4 x i8> %x = < #x00 (0), poison, #x00 (0), #x00 (0) >
<4 x i8> %bswap = < #x00 (0), #x00 (0), #x00 (0)	[based on undef value], #x00 (0) >
i32 %cast = #x00000000 (0)

SOURCE MEMORY STATE
===================
NON-LOCAL BLOCKS:
Block 0 >	size: 0	align: 4	alloc type: 0
Block 1 >	size: 8	align: 4	alloc type: 0

Target:
ptr %1 = pointer(non-local, block_id=1, offset=0)
i32 %x1 = poison
i32 %cast = poison
Source value: #x00000000 (0)
Target value: poison


------------------- SMT STATS -------------------
Num queries: 10
Num invalid: 0
Num skips:   0
Num trivial: 16 (61.5%)
Num timeout: 0 (0.0%)
Num errors:  0 (0.0%)
Num SAT:     7 (70.0%)
Num UNSAT:   3 (30.0%)
Alive2: Transform doesn't verify; aborting!

stderr:

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

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

 

<-- Back