Test Failure: Transforms/LoadStoreVectorizer/int_sideeffect.ll

Test source: git

Log:

Source: <stdin>

----------------------------------------
define void @test_sideeffect(* %p) {
%0:
  %p0 = gep * %p, 4 x i64 0
  %p1 = gep * %p, 4 x i64 1
  %p2 = gep * %p, 4 x i64 2
  %p3 = gep * %p, 4 x i64 3
  %l0 = load float, * %p0, align 16
  %l1 = load float, * %p1, align 4
  %l2 = load float, * %p2, align 4
  call void @llvm.sideeffect() nofree willreturn
  %l3 = load float, * %p3, align 4
  store float %l0, * %p0, align 16
  call void @llvm.sideeffect() nofree willreturn
  store float %l1, * %p1, align 4
  store float %l2, * %p2, align 4
  store float %l3, * %p3, align 4
  ret void
}
=>
define void @test_sideeffect(* %p) {
%0:
  %p0 = gep * %p, 4 x i64 0
  %1 = bitcast * %p0 to *
  %2 = load <4 x float>, * %1, align 16
  %l01 = extractelement <4 x float> %2, i32 0
  %l12 = extractelement <4 x float> %2, i32 1
  %l23 = extractelement <4 x float> %2, i32 2
  %l34 = extractelement <4 x float> %2, i32 3
  call void @llvm.sideeffect() nofree willreturn
  call void @llvm.sideeffect() nofree willreturn
  %3 = insertelement <4 x float> poison, float %l01, i32 0
  %4 = insertelement <4 x float> %3, float %l12, i32 1
  %5 = insertelement <4 x float> %4, float %l23, i32 2
  %6 = insertelement <4 x float> %5, float %l34, i32 3
  %7 = bitcast * %p0 to *
  store <4 x float> %6, * %7, align 16
  ret void
}
Transformation doesn't verify!
ERROR: Couldn't prove the correctness of the transformation
Alive2 approximated the semantics of the programs and therefore we
cannot conclude whether the bug found is valid or not.

Approximations done:
 - Unknown libcall: @llvm.sideeffect



----------------------------------------
define void @test_inaccessiblememonly(* %p) {
%0:
  %p0 = gep * %p, 4 x i64 0
  %p1 = gep * %p, 4 x i64 1
  %p2 = gep * %p, 4 x i64 2
  %p3 = gep * %p, 4 x i64 3
  %l0 = load float, * %p0, align 16
  %l1 = load float, * %p1, align 4
  %l2 = load float, * %p2, align 4
  call void @foo()
  %l3 = load float, * %p3, align 4
  store float %l0, * %p0, align 16
  call void @foo()
  store float %l1, * %p1, align 4
  store float %l2, * %p2, align 4
  store float %l3, * %p3, align 4
  ret void
}
=>
define void @test_inaccessiblememonly(* %p) {
%0:
  %p0 = gep * %p, 4 x i64 0
  %1 = bitcast * %p0 to *
  %2 = load <4 x float>, * %1, align 16
  %l01 = extractelement <4 x float> %2, i32 0
  %l12 = extractelement <4 x float> %2, i32 1
  %l23 = extractelement <4 x float> %2, i32 2
  %l34 = extractelement <4 x float> %2, i32 3
  call void @foo()
  call void @foo()
  %3 = insertelement <4 x float> poison, float %l01, i32 0
  %4 = insertelement <4 x float> %3, float %l12, i32 1
  %5 = insertelement <4 x float> %4, float %l23, i32 2
  %6 = insertelement <4 x float> %5, float %l34, i32 3
  %7 = bitcast * %p0 to *
  store <4 x float> %6, * %7, align 16
  ret void
}
Transformation doesn't verify!
ERROR: Source is more defined than target

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

Source:
* %p0 = pointer(non-local, block_id=1, offset=0)
* %p1 = pointer(non-local, block_id=1, offset=4)
* %p2 = pointer(non-local, block_id=1, offset=8)
* %p3 = pointer(non-local, block_id=1, offset=12)
float %l0 = poison
float %l1 = poison
float %l2 = poison
void = UB triggered!

SOURCE MEMORY STATE
===================
NON-LOCAL BLOCKS:
Block 0 >	size: 0	align: 1	alloc type: 0
Block 1 >	size: 12	align: 32	alloc type: 0
Block 2 >	alloc type: 0

Target:
* %p0 = pointer(non-local, block_id=1, offset=0)
* %1 = pointer(non-local, block_id=1, offset=0)
<4 x float> %2 = UB triggered!



------------------- SMT STATS -------------------
Num queries: 8
Num invalid: 0
Num skips:   0
Num trivial: 7 (46.7%)
Num timeout: 0 (0.0%)
Num errors:  0 (0.0%)
Num SAT:     8 (100.0%)
Num UNSAT:   0 (0.0%)
Alive2: Transform doesn't verify; aborting!

stderr:

+ : 'RUN: at line 2'
+ /home/nlopes/alive2/build/opt-alive.sh -S -load-store-vectorizer
+ /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/LoadStoreVectorizer/int_sideeffect.ll

FileCheck error: '<stdin>' is empty.
FileCheck command line:  /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/LoadStoreVectorizer/int_sideeffect.ll

 

<-- Back