Test Failure: Transforms/SROA/vector-conversion.ll

Test source: git

Log:

Source: <stdin>

----------------------------------------
define <4 x i64> @vector_ptrtoint({<2 x *>, <2 x *>} %x) {
%0:
  %a = alloca i64 32, align 16
  store {<2 x *>, <2 x *>} %x, * %a, align 16
  %cast = bitcast * %a to *
  %vec = load <4 x i64>, * %cast, align 32
  ret <4 x i64> %vec
}
=>
define <4 x i64> @vector_ptrtoint({<2 x *>, <2 x *>} %x) {
%0:
  %x.fca.0.extract = extractvalue {<2 x *>, <2 x *>} %x, 0
  %1 = ptrtoint <2 x *> %x.fca.0.extract to <2 x i64>
  %a.sroa.0.0.vec.expand = shufflevector <2 x i64> %1, <2 x i64> poison, 0, 1, 4294967295, 4294967295
  %a.sroa.0.0.vecblend = select <4 x i1> { 1, 1, 0, 0 }, <4 x i64> %a.sroa.0.0.vec.expand, <4 x i64> undef
  %x.fca.1.extract = extractvalue {<2 x *>, <2 x *>} %x, 1
  %2 = ptrtoint <2 x *> %x.fca.1.extract to <2 x i64>
  %a.sroa.0.16.vec.expand = shufflevector <2 x i64> %2, <2 x i64> poison, 4294967295, 4294967295, 0, 1
  %a.sroa.0.16.vecblend = select <4 x i1> { 0, 0, 1, 1 }, <4 x i64> %a.sroa.0.16.vec.expand, <4 x i64> %a.sroa.0.0.vecblend
  ret <4 x i64> %a.sroa.0.16.vecblend
}
Transformation seems to be correct!


----------------------------------------
define <4 x *> @vector_inttoptr({<2 x i64>, <2 x i64>} %x) {
%0:
  %a = alloca i64 32, align 16
  store {<2 x i64>, <2 x i64>} %x, * %a, align 16
  %cast = bitcast * %a to *
  %vec = load <4 x *>, * %cast, align 32
  ret <4 x *> %vec
}
=>
define <4 x *> @vector_inttoptr({<2 x i64>, <2 x i64>} %x) {
%0:
  %x.fca.0.extract = extractvalue {<2 x i64>, <2 x i64>} %x, 0
  %1 = int2ptr <2 x i64> %x.fca.0.extract to <2 x *>
  %a.sroa.0.0.vec.expand = shufflevector <2 x *> %1, <2 x *> poison, 0, 1, 4294967295, 4294967295
  %a.sroa.0.0.vecblend = select <4 x i1> { 1, 1, 0, 0 }, <4 x *> %a.sroa.0.0.vec.expand, <4 x *> undef
  %x.fca.1.extract = extractvalue {<2 x i64>, <2 x i64>} %x, 1
  %2 = int2ptr <2 x i64> %x.fca.1.extract to <2 x *>
  %a.sroa.0.16.vec.expand = shufflevector <2 x *> %2, <2 x *> poison, 4294967295, 4294967295, 0, 1
  %a.sroa.0.16.vecblend = select <4 x i1> { 0, 0, 1, 1 }, <4 x *> %a.sroa.0.16.vec.expand, <4 x *> %a.sroa.0.0.vecblend
  ret <4 x *> %a.sroa.0.16.vecblend
}
Transformation seems to be correct!


----------------------------------------
define <2 x i64> @vector_ptrtointbitcast({<1 x *>, <1 x *>} %x) {
%0:
  %a = alloca i64 16, align 8
  store {<1 x *>, <1 x *>} %x, * %a, align 8
  %cast = bitcast * %a to *
  %vec = load <2 x i64>, * %cast, align 16
  ret <2 x i64> %vec
}
=>
define <2 x i64> @vector_ptrtointbitcast({<1 x *>, <1 x *>} %x) {
%0:
  %x.fca.0.extract = extractvalue {<1 x *>, <1 x *>} %x, 0
  %1 = ptrtoint <1 x *> %x.fca.0.extract to <1 x i64>
  %2 = bitcast <1 x i64> %1 to i64
  %a.sroa.0.0.vec.insert = insertelement <2 x i64> undef, i64 %2, i32 0
  %x.fca.1.extract = extractvalue {<1 x *>, <1 x *>} %x, 1
  %3 = ptrtoint <1 x *> %x.fca.1.extract to <1 x i64>
  %4 = bitcast <1 x i64> %3 to i64
  %a.sroa.0.8.vec.insert = insertelement <2 x i64> %a.sroa.0.0.vec.insert, i64 %4, i32 1
  ret <2 x i64> %a.sroa.0.8.vec.insert
}
Transformation seems to be correct!


----------------------------------------
define <2 x *> @vector_inttoptrbitcast_vector({<16 x i8>, <16 x i8>} %x) {
%0:
  %a = alloca i64 32, align 16
  store {<16 x i8>, <16 x i8>} %x, * %a, align 16
  %cast = bitcast * %a to *
  %vec = load <2 x *>, * %cast, align 16
  ret <2 x *> %vec
}
=>
define <2 x *> @vector_inttoptrbitcast_vector({<16 x i8>, <16 x i8>} %x) {
%0:
  %x.fca.0.extract = extractvalue {<16 x i8>, <16 x i8>} %x, 0
  %x.fca.1.extract = extractvalue {<16 x i8>, <16 x i8>} %x, 1
  %1 = bitcast <16 x i8> %x.fca.0.extract to <2 x i64>
  %2 = int2ptr <2 x i64> %1 to <2 x *>
  ret <2 x *> %2
}
Transformation seems to be correct!


----------------------------------------
define <16 x i8> @vector_ptrtointbitcast_vector({<2 x *>, <2 x *>} %x) {
%0:
  %a = alloca i64 32, align 16
  store {<2 x *>, <2 x *>} %x, * %a, align 16
  %cast = bitcast * %a to *
  %vec = load <16 x i8>, * %cast, align 16
  ret <16 x i8> %vec
}
=>
define <16 x i8> @vector_ptrtointbitcast_vector({<2 x *>, <2 x *>} %x) {
%0:
  %x.fca.0.extract = extractvalue {<2 x *>, <2 x *>} %x, 0
  %1 = ptrtoint <2 x *> %x.fca.0.extract to <2 x i64>
  %2 = bitcast <2 x i64> %1 to <16 x i8>
  %x.fca.1.extract = extractvalue {<2 x *>, <2 x *>} %x, 1
  ret <16 x i8> %2
}
Transformation doesn't verify!
ERROR: Target is more poisonous than source

Example:
{<2 x *>, <2 x *>} %x = { < poison, null	[based on undef value] >, < null, poison > }

Source:
* %a = pointer(local, block_id=8, offset=0)
* %cast = pointer(local, block_id=8, offset=0)
<16 x i8> %vec = < poison, #x00 (0), #x00 (0), #x00 (0), #x00 (0), #x00 (0), #x00 (0), #x00 (0), poison, #x00 (0), #x00 (0), #x00 (0), #x00 (0), #x00 (0), #x00 (0), #x00 (0) >

SOURCE MEMORY STATE
===================
NON-LOCAL BLOCKS:
Block 0 >	size: 0	align: 8	alloc type: 0	address: 0
Block 1 >	size: 146651266840477907	align: 4	alloc type: 0	address: 1730658824538561571
Block 2 >	size: 46408804741717002	align: 4	alloc type: 0	address: 7495120627670483056
Block 3 >	size: 999615126357544294	align: 16	alloc type: 0	address: 8070451636323434498
Block 4 >	size: 5188146843234779250	align: 2	alloc type: 0	address: 2305857527554015236

LOCAL BLOCKS:
Block 8 >	size: 32	align: 16	alloc type: 1

Target:
<2 x *> %x.fca.0.extract = < poison, null >
<2 x i64> %1 = < poison, #x0000000000000000 (0) >
<16 x i8> %2 = < poison, poison, poison, poison, poison, poison, poison, poison, #x00 (0), #x00 (0), #x00 (0), #x00 (0), #x00 (0), #x00 (0), #x00 (0), #x00 (0) >
<2 x *> %x.fca.1.extract = < null, poison >
Source value: < poison, #x00 (0), #x00 (0), #x00 (0), #x00 (0), #x00 (0), #x00 (0), #x00 (0), poison, #x00 (0), #x00 (0), #x00 (0), #x00 (0), #x00 (0), #x00 (0), #x00 (0) >
Target value: < poison, poison, poison, poison, poison, poison, poison, poison, #x00 (0), #x00 (0), #x00 (0), #x00 (0), #x00 (0), #x00 (0), #x00 (0), #x00 (0) >


------------------- SMT STATS -------------------
Num queries: 12
Num invalid: 0
Num skips:   0
Num trivial: 74 (86.0%)
Num timeout: 0 (0.0%)
Num errors:  0 (0.0%)
Num SAT:     9 (75.0%)
Num UNSAT:   3 (25.0%)
Alive2: Transform doesn't verify; aborting!

stderr:

+ : 'RUN: at line 1'
+ /home/nlopes/alive2/build/opt-alive.sh -sroa -S
+ /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/SROA/vector-conversion.ll

FileCheck error: '<stdin>' is empty.
FileCheck command line:  /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/SROA/vector-conversion.ll

 

<-- Back