Test source: git
Source: <stdin> -- 1. ModuleToFunctionPassAdaptor -- 1. PassManager<Function> : Skipping NOP -- 2. SeparateConstOffsetFromGEPPass ---------------------------------------- define i64 @test1(ptr %array, i64 %i, i64 %j) { %entry: %add = add nsw i64 %i, 5 %gep = gep inbounds ptr %array, 8 x i64 %add store i64 %j, ptr %gep, align 4 %add2 = add nsw i64 %i, 6 %gep2 = gep inbounds ptr %array, 8 x i64 %add2 store i64 %j, ptr %gep2, align 4 %add3 = add nsw i64 %i, 35 %gep3 = gep inbounds ptr %array, 8 x i64 %add3 store i64 %add, ptr %gep3, align 4 ret i64 undef } Transformation seems to be correct! (syntactically equal) -- 3. SeparateConstOffsetFromGEPPass ---------------------------------------- define i64 @test1(ptr %array, i64 %i, i64 %j) { %entry: %add = add nsw i64 %i, 5 %gep = gep inbounds ptr %array, 8 x i64 %add store i64 %j, ptr %gep, align 4 %add2 = add nsw i64 %i, 6 %gep2 = gep inbounds ptr %array, 8 x i64 %add2 store i64 %j, ptr %gep2, align 4 %add3 = add nsw i64 %i, 35 %gep3 = gep inbounds ptr %array, 8 x i64 %add3 store i64 %add, ptr %gep3, align 4 ret i64 undef } => define i64 @test1(ptr %array, i64 %i, i64 %j) { %entry: %add = add nsw i64 %i, 5 %0 = gep ptr %array, 8 x i64 %i %gep4 = gep inbounds ptr %0, 8 x i64 5 store i64 %j, ptr %gep4, align 4 %1 = gep ptr %array, 8 x i64 %i %gep26 = gep inbounds ptr %1, 8 x i64 6 store i64 %j, ptr %gep26, align 4 %2 = gep ptr %array, 8 x i64 %i %gep38 = gep inbounds ptr %2, 8 x i64 35 store i64 %add, ptr %gep38, align 4 ret i64 undef } Transformation doesn't verify! (not unsound) ERROR: Timeout -- 4. EarlyCSEPass ---------------------------------------- define i64 @test1(ptr %array, i64 %i, i64 %j) { %entry: %add = add nsw i64 %i, 5 %0 = gep ptr %array, 8 x i64 %i %gep4 = gep inbounds ptr %0, 8 x i64 5 store i64 %j, ptr %gep4, align 4 %1 = gep ptr %array, 8 x i64 %i %gep26 = gep inbounds ptr %1, 8 x i64 6 store i64 %j, ptr %gep26, align 4 %2 = gep ptr %array, 8 x i64 %i %gep38 = gep inbounds ptr %2, 8 x i64 35 store i64 %add, ptr %gep38, align 4 ret i64 undef } Transformation seems to be correct! (syntactically equal) -- 5. EarlyCSEPass ---------------------------------------- define i64 @test1(ptr %array, i64 %i, i64 %j) { %entry: %add = add nsw i64 %i, 5 %0 = gep ptr %array, 8 x i64 %i %gep4 = gep inbounds ptr %0, 8 x i64 5 store i64 %j, ptr %gep4, align 4 %1 = gep ptr %array, 8 x i64 %i %gep26 = gep inbounds ptr %1, 8 x i64 6 store i64 %j, ptr %gep26, align 4 %2 = gep ptr %array, 8 x i64 %i %gep38 = gep inbounds ptr %2, 8 x i64 35 store i64 %add, ptr %gep38, align 4 ret i64 undef } => define i64 @test1(ptr %array, i64 %i, i64 %j) { %entry: %add = add nsw i64 %i, 5 %0 = gep ptr %array, 8 x i64 %i %gep4 = gep inbounds ptr %0, 8 x i64 5 store i64 %j, ptr %gep4, align 4 %gep26 = gep inbounds ptr %0, 8 x i64 6 store i64 %j, ptr %gep26, align 4 %gep38 = gep inbounds ptr %0, 8 x i64 35 store i64 %add, ptr %gep38, align 4 ret i64 undef } Transformation doesn't verify! (not unsound) ERROR: Timeout -- 6. PassManager<Function> : Skipping NOP -- 7. PassManager<Function> : Skipping NOP -- 8. SeparateConstOffsetFromGEPPass ---------------------------------------- define i32 @test2(ptr %array, i32 %i, i32 %j) { %entry: %add = add nsw i32 %i, 5 %sext = sext i32 %add to i64 %gep = gep inbounds ptr %array, 4 x i64 %sext store i32 %j, ptr %gep, align 4 %add3 = add nsw i32 %i, 6 %sext4 = sext i32 %add3 to i64 %gep5 = gep inbounds ptr %array, 4 x i64 %sext4 store i32 %j, ptr %gep5, align 4 %add6 = add nsw i32 %i, 35 %sext7 = sext i32 %add6 to i64 %gep8 = gep inbounds ptr %array, 4 x i64 %sext7 store i32 %add, ptr %gep8, align 4 ret i32 undef } Transformation seems to be correct! (syntactically equal) -- 9. SeparateConstOffsetFromGEPPass ---------------------------------------- define i32 @test2(ptr %array, i32 %i, i32 %j) { %entry: %add = add nsw i32 %i, 5 %sext = sext i32 %add to i64 %gep = gep inbounds ptr %array, 4 x i64 %sext store i32 %j, ptr %gep, align 4 %add3 = add nsw i32 %i, 6 %sext4 = sext i32 %add3 to i64 %gep5 = gep inbounds ptr %array, 4 x i64 %sext4 store i32 %j, ptr %gep5, align 4 %add6 = add nsw i32 %i, 35 %sext7 = sext i32 %add6 to i64 %gep8 = gep inbounds ptr %array, 4 x i64 %sext7 store i32 %add, ptr %gep8, align 4 ret i32 undef } => define i32 @test2(ptr %array, i32 %i, i32 %j) { %entry: %add = add nsw i32 %i, 5 %0 = sext i32 %i to i64 %1 = gep ptr %array, 4 x i64 %0 %gep2 = gep inbounds ptr %1, 4 x i64 5 store i32 %j, ptr %gep2, align 4 %2 = sext i32 %i to i64 %3 = gep ptr %array, 4 x i64 %2 %gep54 = gep inbounds ptr %3, 4 x i64 6 store i32 %j, ptr %gep54, align 4 %4 = sext i32 %i to i64 %5 = gep ptr %array, 4 x i64 %4 %gep86 = gep inbounds ptr %5, 4 x i64 35 store i32 %add, ptr %gep86, align 4 ret i32 undef } Transformation doesn't verify! (unsound) ERROR: Source is more defined than target Example: ptr %array = pointer(non-local, block_id=1, offset=104) i32 %i = #xffffffe1 (4294967265, -31) i32 %j = poison Source: i32 %add = #xffffffe6 (4294967270, -26) i64 %sext = #xffffffffffffffe6 (18446744073709551590, -26) ptr %gep = pointer(non-local, block_id=1, offset=0) i32 %add3 = #xffffffe7 (4294967271, -25) i64 %sext4 = #xffffffffffffffe7 (18446744073709551591, -25) ptr %gep5 = pointer(non-local, block_id=1, offset=4) i32 %add6 = #x00000004 (4) i64 %sext7 = #x0000000000000004 (4) ptr %gep8 = pointer(non-local, block_id=1, offset=120) SOURCE MEMORY STATE =================== NON-LOCAL BLOCKS: Block 0 > size: 0 align: 4 alloc type: 0 address: 0 Block 1 > size: 549755813888 align: 17179869184 alloc type: 0 address: 336118796 Target: i32 %add = #xffffffe6 (4294967270, -26) i64 %0 = #xffffffffffffffe1 (18446744073709551585, -31) ptr %1 = pointer(non-local, block_id=1, offset=-20) ptr %gep2 = poison void = UB triggered! 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=riscv64-unknown-elf' '-passes=separate-const-offset-from-gep,early-cse' '-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_QJxK0PZf_bL3y.bc" ------------------- SMT STATS ------------------- Num queries: 16 Num invalid: 0 Num skips: 0 Num trivial: 16 (50.0%) Num timeout: 2 (12.5%) Num errors: 0 (0.0%) Num SAT: 11 (68.8%) Num UNSAT: 3 (18.8%) Alive2: Transform doesn't verify; aborting!
+ : 'RUN: at line 2' + /home/nlopes/alive2/build/opt-alive.sh -mtriple=riscv64-unknown-elf -passes=separate-const-offset-from-gep,early-cse -S + /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/SeparateConstOffsetFromGEP/RISCV/split-gep.ll FileCheck error: '<stdin>' is empty. FileCheck command line: /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/SeparateConstOffsetFromGEP/RISCV/split-gep.ll