Test Failure: Transforms/SeparateConstOffsetFromGEP/NVPTX/split-gep.ll

Test source: git

Log:

Source: <stdin>
-- 1. ModuleToFunctionPassAdaptor
-- 1. PassManager<Function> : Skipping NOP
-- 2. SeparateConstOffsetFromGEPPass

----------------------------------------
@struct_array = global 16384 bytes, align 16

define ptr @struct(i32 %i) {
%entry:
  %add = add nsw i32 %i, 5
  %idxprom = sext i32 %add to i64
  %p = gep inbounds ptr @struct_array, 16384 x i64 0, 16 x i64 %idxprom, 1 x i64 8
  ret ptr %p
}
Transformation seems to be correct! (syntactically equal)

-- 3. SeparateConstOffsetFromGEPPass

----------------------------------------
@struct_array = global 16384 bytes, align 16

define ptr @struct(i32 %i) {
%entry:
  %add = add nsw i32 %i, 5
  %idxprom = sext i32 %add to i64
  %p = gep inbounds ptr @struct_array, 16384 x i64 0, 16 x i64 %idxprom, 1 x i64 8
  ret ptr %p
}
=>
@struct_array = global 16384 bytes, align 16

define ptr @struct(i32 %i) {
%entry:
  %0 = sext i32 %i to i64
  %1 = gep ptr @struct_array, 16384 x i64 0, 16 x i64 %0, 1 x i64 8
  %p2 = gep inbounds ptr %1, 8 x i64 10
  ret ptr %p2
}
Transformation doesn't verify! (unsound)
ERROR: Target is more poisonous than source

Example:
i32 %i = #xfffffffe (4294967294, -2)

Source:
i32 %add = #x00000003 (3)
i64 %idxprom = #x0000000000000003 (3)
ptr %p = pointer(non-local, block_id=0, offset=56)

SOURCE MEMORY STATE
===================
NON-LOCAL BLOCKS:
Block 0 >	size: 16384	align: 16	alloc type: 0	address: 34359738368

Target:
i64 %0 = #xfffffffffffffffe (18446744073709551614, -2)
ptr %1 = pointer(non-local, block_id=0, offset=-24)
ptr %p2 = poison
Source value: pointer(non-local, block_id=0, offset=56)
Target value: poison

Pass: SeparateConstOffsetFromGEPPass
Command line: '/home/nlopes/llvm/build/bin/opt' '-load=/home/nlopes/alive2/build/tv/tv.so' '-load-pass-plugin=/home/nlopes/alive2/build/tv/tv.so' '-tv-exit-on-error' '-mtriple=nvptx64-nvidia-cuda' '-passes=separate-const-offset-from-gep' '-reassociate-geps-verify-no-dead-code' '-S' '-tv-smt-to=20000' '-tv-report-dir=/home/nlopes/alive2/build/logs' '-tv-smt-stats'
Wrote bitcode to: "/home/nlopes/alive2/build/logs/in_qy2q3MhW_BBAc.bc"


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

stderr:

+ : 'RUN: at line 1'
+ /home/nlopes/alive2/build/opt-alive.sh -mtriple=nvptx64-nvidia-cuda -passes=separate-const-offset-from-gep -reassociate-geps-verify-no-dead-code -S
+ /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/SeparateConstOffsetFromGEP/NVPTX/split-gep.ll

FileCheck error: '<stdin>' is empty.
FileCheck command line:  /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/SeparateConstOffsetFromGEP/NVPTX/split-gep.ll

 

<-- Back