Test Failure: Transforms/SLPVectorizer/X86/extract_in_tree_user.ll

Test source: git

Log:

Source: <stdin>

----------------------------------------
@a = global 8 bytes, align 8

define i32 @fn1() {
%entry:
  %0 = load *, * @a, align 8
  %add.ptr = gep inbounds * %0, 8 x i64 11
  %1 = ptrtoint * %add.ptr to i64
  store i64 %1, * %add.ptr, align 8
  %add.ptr1 = gep inbounds * %0, 8 x i64 56
  %2 = ptrtoint * %add.ptr1 to i64
  %arrayidx2 = gep inbounds * %0, 8 x i64 12
  store i64 %2, * %arrayidx2, align 8
  ret i32 undef
}
=>
@a = global 8 bytes, align 8

define i32 @fn1() {
%entry:
  %0 = load *, * @a, align 8
  %1 = insertelement <2 x *> poison, * %0, i32 0
  %2 = insertelement <2 x *> %1, * %0, i32 1
  %3 = gep <2 x *> %2, 8 x <2 x i64> { 11, 56 }
  %4 = ptrtoint <2 x *> %3 to <2 x i64>
  %5 = extractelement <2 x *> %3, i32 0
  %6 = bitcast * %5 to *
  store <2 x i64> %4, * %6, align 8
  ret i32 undef
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define void @fn2(* %a, * %b, * %c) {
%entry:
  %i0 = load i32, * %a, align 4
  %i1 = load i32, * %b, align 4
  %add1 = add i32 %i0, %i1
  %fp1 = sitofp i32 %add1 to float
  %call1 = call float @llvm.powi.f32.i32(float %fp1, i32 %add1) noread nowrite nofree willreturn
  %arrayidx2 = gep inbounds * %a, 4 x i32 1
  %i2 = load i32, * %arrayidx2, align 4
  %arrayidx3 = gep inbounds * %b, 4 x i32 1
  %i3 = load i32, * %arrayidx3, align 4
  %add2 = add i32 %i2, %i3
  %fp2 = sitofp i32 %add2 to float
  %call2 = call float @llvm.powi.f32.i32(float %fp2, i32 %add1) noread nowrite nofree willreturn
  %arrayidx4 = gep inbounds * %a, 4 x i32 2
  %i4 = load i32, * %arrayidx4, align 4
  %arrayidx5 = gep inbounds * %b, 4 x i32 2
  %i5 = load i32, * %arrayidx5, align 4
  %add3 = add i32 %i4, %i5
  %fp3 = sitofp i32 %add3 to float
  %call3 = call float @llvm.powi.f32.i32(float %fp3, i32 %add1) noread nowrite nofree willreturn
  %arrayidx6 = gep inbounds * %a, 4 x i32 3
  %i6 = load i32, * %arrayidx6, align 4
  %arrayidx7 = gep inbounds * %b, 4 x i32 3
  %i7 = load i32, * %arrayidx7, align 4
  %add4 = add i32 %i6, %i7
  %fp4 = sitofp i32 %add4 to float
  %call4 = call float @llvm.powi.f32.i32(float %fp4, i32 %add1) noread nowrite nofree willreturn
  store float %call1, * %c, align 4
  %arrayidx8 = gep inbounds * %c, 4 x i32 1
  store float %call2, * %arrayidx8, align 4
  %arrayidx9 = gep inbounds * %c, 4 x i32 2
  store float %call3, * %arrayidx9, align 4
  %arrayidx10 = gep inbounds * %c, 4 x i32 3
  store float %call4, * %arrayidx10, align 4
  ret void
}
=>
define void @fn2(* %a, * %b, * %c) {
%entry:
  %0 = bitcast * %a to *
  %1 = load <4 x i32>, * %0, align 4
  %2 = bitcast * %b to *
  %3 = load <4 x i32>, * %2, align 4
  %4 = add <4 x i32> %1, %3
  %5 = sitofp <4 x i32> %4 to <4 x float>
  %6 = extractelement <4 x i32> %4, i32 0
  %7 = call <4 x float> @llvm.powi.v4f32.i32(<4 x float> %5, i32 %6) noread nowrite nofree willreturn
  %8 = bitcast * %c to *
  store <4 x float> %7, * %8, align 4
  ret void
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
@a = global 8 bytes, align 8

define void @externally_used_ptrs() {
%entry:
  %0 = load *, * @a, align 8
  %add.ptr = gep inbounds * %0, 8 x i64 11
  %1 = ptrtoint * %add.ptr to i64
  %add.ptr1 = gep inbounds * %0, 8 x i64 56
  %2 = ptrtoint * %add.ptr1 to i64
  %arrayidx2 = gep inbounds * %0, 8 x i64 12
  %3 = load i64, * %arrayidx2, align 8
  %4 = load i64, * %add.ptr, align 8
  %5 = add i64 %1, %3
  %6 = add i64 %2, %4
  store i64 %6, * %add.ptr, align 8
  store i64 %5, * %arrayidx2, align 8
  ret void
}
=>
@a = global 8 bytes, align 8

define void @externally_used_ptrs() {
%entry:
  %0 = load *, * @a, align 8
  %1 = insertelement <2 x *> poison, * %0, i32 0
  %2 = insertelement <2 x *> %1, * %0, i32 1
  %3 = gep <2 x *> %2, 8 x <2 x i64> { 56, 11 }
  %4 = ptrtoint <2 x *> %3 to <2 x i64>
  %5 = extractelement <2 x *> %3, i32 0
  %6 = bitcast * %5 to *
  %7 = load <2 x i64>, * %6, align 8
  %8 = extractelement <2 x *> %3, i32 1
  %9 = add <2 x i64> %4, %7
  %10 = bitcast * %5 to *
  store <2 x i64> %9, * %10, align 8
  ret void
}
Transformation doesn't verify!
ERROR: Source is more defined than target

Example:

Source:
* %0 = pointer(non-local, block_id=2, offset=4611686018427387694)
* %add.ptr = pointer(non-local, block_id=2, offset=4611686018427387782)
i64 %1 = #x3fffffffffffff88 (4611686018427387784)
* %add.ptr1 = poison
i64 %2 = poison
* %arrayidx2 = pointer(non-local, block_id=2, offset=4611686018427387790)
i64 %3 = poison
i64 %4 = poison
i64 %5 = poison
i64 %6 = poison

SOURCE MEMORY STATE
===================
NON-LOCAL BLOCKS:
Block 0 >	size: 0	align: 8	alloc type: 0	address: 0
Block 1 >	size: 8	align: 8	alloc type: 0	address: 18446744073709551600
Block 2 >	size: 4611686018427387905	align: 2	alloc type: 0	address: 2

Target:
* %0 = pointer(non-local, block_id=2, offset=4611686018427387694)
<2 x *> %1 = < pointer(non-local, block_id=2, offset=4611686018427387694), poison >
<2 x *> %2 = < pointer(non-local, block_id=2, offset=4611686018427387694), pointer(non-local, block_id=2, offset=4611686018427387694) >
<2 x *> %3 = < pointer(non-local, block_id=2, offset=4611686018427388142), pointer(non-local, block_id=2, offset=4611686018427387782) >
<2 x i64> %4 = < #x40000000000000f0 (4611686018427388144), #x3fffffffffffff88 (4611686018427387784) >
* %5 = pointer(non-local, block_id=2, offset=4611686018427388142)
* %6 = pointer(non-local, block_id=2, offset=4611686018427388142)
<2 x i64> %7 = UB triggered!



------------------- SMT STATS -------------------
Num queries: 15
Num invalid: 0
Num skips:   0
Num trivial: 16 (51.6%)
Num timeout: 2 (13.3%)
Num errors:  0 (0.0%)
Num SAT:     10 (66.7%)
Num UNSAT:   3 (20.0%)
Alive2: Transform doesn't verify; aborting!

stderr:

+ : 'RUN: at line 2'
+ /home/nlopes/alive2/build/opt-alive.sh -basic-aa -slp-vectorizer -S -mtriple=i386-apple-macosx10.9.0 -mcpu=corei7-avx
+ /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/SLPVectorizer/X86/extract_in_tree_user.ll

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

 

<-- Back