Test source: git
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, 1 x i64 80 ret ptr %p2 } Transformation doesn't verify! (unsound) ERROR: Target is more poisonous than source Example: i32 %i = #xfffffffd (4294967293, -3) Source: i32 %add = #x00000002 (2) i64 %idxprom = #x0000000000000002 (2) ptr %p = pointer(non-local, block_id=0, offset=40) / Address=#x7fffffc028 SOURCE MEMORY STATE =================== NON-LOCAL BLOCKS: Block 0 > size: 16384 align: 16 alloc type: 0 alive: true address: 549755797504 Target: i64 %#0 = #xfffffffffffffffd (18446744073709551613, -3) ptr %#1 = pointer(non-local, block_id=0, offset=-40) / Address=#x7fffffbfd8 ptr %p2 = poison Source value: pointer(non-local, block_id=0, offset=40) / Address=#x7fffffc028 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_DHT3poGv_pwjh.bc" ------------------- SMT STATS ------------------- Num queries: 9 Num invalid: 0 Num skips: 0 Num trivial: 9 (50.0%) Num timeout: 0 (0.0%) Num errors: 0 (0.0%) Num SAT: 6 (66.7%) Num UNSAT: 3 (33.3%) Alive2: Transform doesn't verify; aborting!
RUN: at line 2: /home/nlopes/alive2/build/opt-alive.sh < /bitbucket/nlopes/llvm/llvm/test/Transforms/SeparateConstOffsetFromGEP/NVPTX/split-gep.ll -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 + /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