Test source: git
Source: <stdin> -- 1. ModuleToFunctionPassAdaptor -- 1. PassManager<Function> : Skipping NOP -- 2. InstCombinePass ---------------------------------------- define void @test1(ptr %a, ptr noread nowrite %a_end, ptr %b.i64) { entry: %cmp1 = icmp ult ptr %a, noread nowrite %a_end br i1 %cmp1, label %for.body.preheader, label %for.end for.body.preheader: %b = load i64, ptr %b.i64, align 8 br label %for.body for.body: %a.addr.03 = phi ptr [ %incdec.ptr, %for.body ], [ %a, %for.body.preheader ] %b.addr.02 = phi i64 [ %add.int, %for.body ], [ %b, %for.body.preheader ] %tmp = int2ptr i64 %b.addr.02 to ptr %i1 = load float, ptr %tmp, align 4 %mul.i = fmul float %i1, 42.000000 store float %mul.i, ptr %a.addr.03, align 4 %add = gep inbounds ptr %tmp, 4 x i64 1 %add.int = ptrtoint ptr %add to i64 %incdec.ptr = gep inbounds ptr %a.addr.03, 4 x i64 1 %cmp = icmp ult ptr %incdec.ptr, noread nowrite %a_end br i1 %cmp, label %for.body, label %for.end for.end: ret void } Transformation seems to be correct! (syntactically equal) -- 3. InstCombinePass ---------------------------------------- define void @test1(ptr %a, ptr noread nowrite %a_end, ptr %b.i64) { entry: %cmp1 = icmp ult ptr %a, noread nowrite %a_end br i1 %cmp1, label %for.body.preheader, label %for.end for.body.preheader: %b = load i64, ptr %b.i64, align 8 br label %for.body for.body: %a.addr.03 = phi ptr [ %incdec.ptr, %for.body ], [ %a, %for.body.preheader ] %b.addr.02 = phi i64 [ %add.int, %for.body ], [ %b, %for.body.preheader ] %tmp = int2ptr i64 %b.addr.02 to ptr %i1 = load float, ptr %tmp, align 4 %mul.i = fmul float %i1, 42.000000 store float %mul.i, ptr %a.addr.03, align 4 %add = gep inbounds ptr %tmp, 4 x i64 1 %add.int = ptrtoint ptr %add to i64 %incdec.ptr = gep inbounds ptr %a.addr.03, 4 x i64 1 %cmp = icmp ult ptr %incdec.ptr, noread nowrite %a_end br i1 %cmp, label %for.body, label %for.end for.end: ret void } => define void @test1(ptr %a, ptr noread nowrite %a_end, ptr %b.i64) { entry: %cmp1 = icmp ult ptr %a, noread nowrite %a_end br i1 %cmp1, label %for.body.preheader, label %for.end for.body.preheader: %b = load i64, ptr %b.i64, align 8 %b.ptr = int2ptr i64 %b to ptr br label %for.body for.body: %a.addr.03 = phi ptr [ %incdec.ptr, %for.body ], [ %a, %for.body.preheader ] %b.addr.02.ptr = phi ptr [ %add, %for.body ], [ %b.ptr, %for.body.preheader ] %i1 = load float, ptr %b.addr.02.ptr, align 4 %mul.i = fmul float %i1, 42.000000 store float %mul.i, ptr %a.addr.03, align 4 %add = gep inbounds ptr %b.addr.02.ptr, 1 x i64 4 %incdec.ptr = gep inbounds ptr %a.addr.03, 1 x i64 4 %cmp = icmp ult ptr %incdec.ptr, noread nowrite %a_end br i1 %cmp, label %for.body, label %for.end for.end: ret void } Transformation doesn't verify! (not unsound) ERROR: Timeout -- 4. PassManager<Function> : Skipping NOP -- 5. PassManager<Function> : Skipping NOP -- 6. InstCombinePass ---------------------------------------- define void @test1_neg(ptr %a, ptr noread nowrite %a_end, ptr %b.i64) { entry: %cmp1 = icmp ult ptr %a, noread nowrite %a_end br i1 %cmp1, label %for.body.preheader, label %for.end for.body.preheader: %b = load i64, ptr %b.i64, align 8 br label %for.body for.body: %a.addr.03 = phi ptr [ %incdec.ptr, %bb ], [ %a, %for.body.preheader ] %b.addr.02 = phi i64 [ %add.int, %bb ], [ %b, %for.body.preheader ] %tmp = int2ptr i64 %b.addr.02 to ptr %ptrcmp = icmp ult ptr %tmp, noread nowrite %a_end br i1 %ptrcmp, label %for.end, label %bb bb: %i1 = load float, ptr %a, align 4 %mul.i = fmul float %i1, 42.000000 store float %mul.i, ptr %a.addr.03, align 4 %add = gep inbounds ptr %a, 4 x i64 1 %add.int = ptrtoint ptr %add to i64 %incdec.ptr = gep inbounds ptr %a.addr.03, 4 x i64 1 %cmp = icmp ult ptr %incdec.ptr, noread nowrite %a_end br i1 %cmp, label %for.body, label %for.end for.end: ret void } Transformation seems to be correct! (syntactically equal) -- 7. InstCombinePass ---------------------------------------- define void @test1_neg(ptr %a, ptr noread nowrite %a_end, ptr %b.i64) { entry: %cmp1 = icmp ult ptr %a, noread nowrite %a_end br i1 %cmp1, label %for.body.preheader, label %for.end for.body.preheader: %b = load i64, ptr %b.i64, align 8 br label %for.body for.body: %a.addr.03 = phi ptr [ %incdec.ptr, %bb ], [ %a, %for.body.preheader ] %b.addr.02 = phi i64 [ %add.int, %bb ], [ %b, %for.body.preheader ] %tmp = int2ptr i64 %b.addr.02 to ptr %ptrcmp = icmp ult ptr %tmp, noread nowrite %a_end br i1 %ptrcmp, label %for.end, label %bb bb: %i1 = load float, ptr %a, align 4 %mul.i = fmul float %i1, 42.000000 store float %mul.i, ptr %a.addr.03, align 4 %add = gep inbounds ptr %a, 4 x i64 1 %add.int = ptrtoint ptr %add to i64 %incdec.ptr = gep inbounds ptr %a.addr.03, 4 x i64 1 %cmp = icmp ult ptr %incdec.ptr, noread nowrite %a_end br i1 %cmp, label %for.body, label %for.end for.end: ret void } => define void @test1_neg(ptr %a, ptr noread nowrite %a_end, ptr %b.i64) { entry: %cmp1 = icmp ult ptr %a, noread nowrite %a_end br i1 %cmp1, label %for.body.preheader, label %for.end for.body.preheader: %b = load i64, ptr %b.i64, align 8 %#0 = int2ptr i64 %b to ptr br label %for.body for.body: %a.addr.03 = phi ptr [ %incdec.ptr, %bb ], [ %a, %for.body.preheader ] %b.addr.02 = phi ptr [ %add, %bb ], [ %#0, %for.body.preheader ] %ptrcmp = icmp ult ptr %b.addr.02, noread nowrite %a_end br i1 %ptrcmp, label %for.end, label %bb bb: %i1 = load float, ptr %a, align 4 %mul.i = fmul float %i1, 42.000000 store float %mul.i, ptr %a.addr.03, align 4 %add = gep inbounds ptr %a, 1 x i64 4 %incdec.ptr = gep inbounds ptr %a.addr.03, 1 x i64 4 %cmp = icmp ult ptr %incdec.ptr, noread nowrite %a_end br i1 %cmp, label %for.body, label %for.end for.end: ret void } Transformation doesn't verify! (not unsound) ERROR: Timeout -- 8. PassManager<Function> : Skipping NOP -- 9. PassManager<Function> : Skipping NOP -- 10. InstCombinePass ---------------------------------------- define void @test2(ptr %a, ptr noread nowrite %a_end, ptr %b.float) { entry: %cmp1 = icmp ult ptr %a, noread nowrite %a_end br i1 %cmp1, label %for.body.preheader, label %for.end for.body.preheader: %b = load i64, ptr %b.float, align 8 br label %for.body for.body: %a.addr.03 = phi ptr [ %incdec.ptr, %for.body ], [ %a, %for.body.preheader ] %b.addr.02 = phi i64 [ %add.int, %for.body ], [ %b, %for.body.preheader ] %tmp = int2ptr i64 %b.addr.02 to ptr %i1 = load float, ptr %tmp, align 4 %mul.i = fmul float %i1, 42.000000 store float %mul.i, ptr %a.addr.03, align 4 %add = gep inbounds ptr %tmp, 4 x i64 1 %add.int = ptrtoint ptr %add to i64 %incdec.ptr = gep inbounds ptr %a.addr.03, 4 x i64 1 %cmp = icmp ult ptr %incdec.ptr, noread nowrite %a_end br i1 %cmp, label %for.body, label %for.end for.end: ret void } Transformation seems to be correct! (syntactically equal) -- 11. InstCombinePass ---------------------------------------- define void @test2(ptr %a, ptr noread nowrite %a_end, ptr %b.float) { entry: %cmp1 = icmp ult ptr %a, noread nowrite %a_end br i1 %cmp1, label %for.body.preheader, label %for.end for.body.preheader: %b = load i64, ptr %b.float, align 8 br label %for.body for.body: %a.addr.03 = phi ptr [ %incdec.ptr, %for.body ], [ %a, %for.body.preheader ] %b.addr.02 = phi i64 [ %add.int, %for.body ], [ %b, %for.body.preheader ] %tmp = int2ptr i64 %b.addr.02 to ptr %i1 = load float, ptr %tmp, align 4 %mul.i = fmul float %i1, 42.000000 store float %mul.i, ptr %a.addr.03, align 4 %add = gep inbounds ptr %tmp, 4 x i64 1 %add.int = ptrtoint ptr %add to i64 %incdec.ptr = gep inbounds ptr %a.addr.03, 4 x i64 1 %cmp = icmp ult ptr %incdec.ptr, noread nowrite %a_end br i1 %cmp, label %for.body, label %for.end for.end: ret void } => define void @test2(ptr %a, ptr noread nowrite %a_end, ptr %b.float) { entry: %cmp1 = icmp ult ptr %a, noread nowrite %a_end br i1 %cmp1, label %for.body.preheader, label %for.end for.body.preheader: %b = load i64, ptr %b.float, align 8 %b.ptr = int2ptr i64 %b to ptr br label %for.body for.body: %a.addr.03 = phi ptr [ %incdec.ptr, %for.body ], [ %a, %for.body.preheader ] %b.addr.02.ptr = phi ptr [ %add, %for.body ], [ %b.ptr, %for.body.preheader ] %i1 = load float, ptr %b.addr.02.ptr, align 4 %mul.i = fmul float %i1, 42.000000 store float %mul.i, ptr %a.addr.03, align 4 %add = gep inbounds ptr %b.addr.02.ptr, 1 x i64 4 %incdec.ptr = gep inbounds ptr %a.addr.03, 1 x i64 4 %cmp = icmp ult ptr %incdec.ptr, noread nowrite %a_end br i1 %cmp, label %for.body, label %for.end for.end: ret void } Transformation doesn't verify! (not unsound) ERROR: Timeout -- 12. PassManager<Function> : Skipping NOP -- 13. PassManager<Function> : Skipping NOP -- 14. InstCombinePass ---------------------------------------- define void @test3(ptr %a, ptr noread nowrite %a_end, ptr %b.i8p) { entry: %cmp1 = icmp ult ptr %a, noread nowrite %a_end br i1 %cmp1, label %for.body.preheader, label %for.end for.body.preheader: %b = load i64, ptr %b.i8p, align 8 br label %for.body for.body: %a.addr.03 = phi ptr [ %incdec.ptr, %for.body ], [ %a, %for.body.preheader ] %b.addr.02 = phi i64 [ %add.int, %for.body ], [ %b, %for.body.preheader ] %tmp = int2ptr i64 %b.addr.02 to ptr %i1 = load float, ptr %tmp, align 4 %mul.i = fmul float %i1, 42.000000 store float %mul.i, ptr %a.addr.03, align 4 %add = gep inbounds ptr %tmp, 4 x i64 1 %add.int = ptrtoint ptr %add to i64 %incdec.ptr = gep inbounds ptr %a.addr.03, 4 x i64 1 %cmp = icmp ult ptr %incdec.ptr, noread nowrite %a_end br i1 %cmp, label %for.body, label %for.end for.end: ret void } Transformation seems to be correct! (syntactically equal) -- 15. InstCombinePass ---------------------------------------- define void @test3(ptr %a, ptr noread nowrite %a_end, ptr %b.i8p) { entry: %cmp1 = icmp ult ptr %a, noread nowrite %a_end br i1 %cmp1, label %for.body.preheader, label %for.end for.body.preheader: %b = load i64, ptr %b.i8p, align 8 br label %for.body for.body: %a.addr.03 = phi ptr [ %incdec.ptr, %for.body ], [ %a, %for.body.preheader ] %b.addr.02 = phi i64 [ %add.int, %for.body ], [ %b, %for.body.preheader ] %tmp = int2ptr i64 %b.addr.02 to ptr %i1 = load float, ptr %tmp, align 4 %mul.i = fmul float %i1, 42.000000 store float %mul.i, ptr %a.addr.03, align 4 %add = gep inbounds ptr %tmp, 4 x i64 1 %add.int = ptrtoint ptr %add to i64 %incdec.ptr = gep inbounds ptr %a.addr.03, 4 x i64 1 %cmp = icmp ult ptr %incdec.ptr, noread nowrite %a_end br i1 %cmp, label %for.body, label %for.end for.end: ret void } => define void @test3(ptr %a, ptr noread nowrite %a_end, ptr %b.i8p) { entry: %cmp1 = icmp ult ptr %a, noread nowrite %a_end br i1 %cmp1, label %for.body.preheader, label %for.end for.body.preheader: %b = load i64, ptr %b.i8p, align 8 %b.ptr = int2ptr i64 %b to ptr br label %for.body for.body: %a.addr.03 = phi ptr [ %incdec.ptr, %for.body ], [ %a, %for.body.preheader ] %b.addr.02.ptr = phi ptr [ %add, %for.body ], [ %b.ptr, %for.body.preheader ] %i1 = load float, ptr %b.addr.02.ptr, align 4 %mul.i = fmul float %i1, 42.000000 store float %mul.i, ptr %a.addr.03, align 4 %add = gep inbounds ptr %b.addr.02.ptr, 1 x i64 4 %incdec.ptr = gep inbounds ptr %a.addr.03, 1 x i64 4 %cmp = icmp ult ptr %incdec.ptr, noread nowrite %a_end br i1 %cmp, label %for.body, label %for.end for.end: ret void } Transformation doesn't verify! (not unsound) ERROR: Timeout -- 16. PassManager<Function> : Skipping NOP -- 17. PassManager<Function> : Skipping NOP -- 18. InstCombinePass ---------------------------------------- define void @test4(ptr %a, ptr noread nowrite %a_end, ptr %b.float) { entry: %cmp1 = icmp ult ptr %a, noread nowrite %a_end br i1 %cmp1, label %for.body.preheader, label %for.end for.body.preheader: %b.f = load ptr, ptr %b.float, align 8 %b = ptrtoint ptr %b.f to i64 br label %for.body for.body: %a.addr.03 = phi ptr [ %incdec.ptr, %for.body ], [ %a, %for.body.preheader ] %b.addr.02 = phi i64 [ %add.int, %for.body ], [ %b, %for.body.preheader ] %tmp = int2ptr i64 %b.addr.02 to ptr %i1 = load float, ptr %tmp, align 4 %mul.i = fmul float %i1, 42.000000 store float %mul.i, ptr %a.addr.03, align 4 %add = gep inbounds ptr %tmp, 4 x i64 1 %add.int = ptrtoint ptr %add to i64 %incdec.ptr = gep inbounds ptr %a.addr.03, 4 x i64 1 %cmp = icmp ult ptr %incdec.ptr, noread nowrite %a_end br i1 %cmp, label %for.body, label %for.end for.end: ret void } Transformation seems to be correct! (syntactically equal) -- 19. InstCombinePass ---------------------------------------- define void @test4(ptr %a, ptr noread nowrite %a_end, ptr %b.float) { entry: %cmp1 = icmp ult ptr %a, noread nowrite %a_end br i1 %cmp1, label %for.body.preheader, label %for.end for.body.preheader: %b.f = load ptr, ptr %b.float, align 8 %b = ptrtoint ptr %b.f to i64 br label %for.body for.body: %a.addr.03 = phi ptr [ %incdec.ptr, %for.body ], [ %a, %for.body.preheader ] %b.addr.02 = phi i64 [ %add.int, %for.body ], [ %b, %for.body.preheader ] %tmp = int2ptr i64 %b.addr.02 to ptr %i1 = load float, ptr %tmp, align 4 %mul.i = fmul float %i1, 42.000000 store float %mul.i, ptr %a.addr.03, align 4 %add = gep inbounds ptr %tmp, 4 x i64 1 %add.int = ptrtoint ptr %add to i64 %incdec.ptr = gep inbounds ptr %a.addr.03, 4 x i64 1 %cmp = icmp ult ptr %incdec.ptr, noread nowrite %a_end br i1 %cmp, label %for.body, label %for.end for.end: ret void } => define void @test4(ptr %a, ptr noread nowrite %a_end, ptr %b.float) { entry: %cmp1 = icmp ult ptr %a, noread nowrite %a_end br i1 %cmp1, label %for.body.preheader, label %for.end for.body.preheader: %b.f = load ptr, ptr %b.float, align 8 br label %for.body for.body: %a.addr.03 = phi ptr [ %incdec.ptr, %for.body ], [ %a, %for.body.preheader ] %b.addr.02.in = phi ptr [ %add, %for.body ], [ %b.f, %for.body.preheader ] %i1 = load float, ptr %b.addr.02.in, align 4 %mul.i = fmul float %i1, 42.000000 store float %mul.i, ptr %a.addr.03, align 4 %add = gep inbounds ptr %b.addr.02.in, 1 x i64 4 %incdec.ptr = gep inbounds ptr %a.addr.03, 1 x i64 4 %cmp = icmp ult ptr %incdec.ptr, noread nowrite %a_end br i1 %cmp, label %for.body, label %for.end for.end: ret void } Transformation doesn't verify! (unsound) ERROR: Source is more defined than target Example: ptr %a = pointer(non-local, block_id=1, offset=0) / Address=#x000000000000000c ptr noread nowrite %a_end = pointer(non-local, block_id=0, offset=13, attrs=3) / Address=#x000000000000000d ptr %b.float = pointer(non-local, block_id=1, offset=4) / Address=#x0000000000000010 Source: i1 %cmp1 = #x1 (1) >> Jump to %for.body.preheader ptr %b.f = pointer(non-local, block_id=2, offset=-5) / Address=#x0000000000000004 i64 %b = #x0000000000000004 (4) >> Jump to %for.body ptr %a.addr.03 = pointer(non-local, block_id=1, offset=0) / Address=#x000000000000000c i64 %b.addr.02 = #x0000000000000004 (4) ptr %tmp = phy-ptr(addr=4) / Address=#x0000000000000004 float %i1 = poison float %mul.i = poison ptr %add = poison i64 %add.int = poison ptr %incdec.ptr = pointer(non-local, block_id=1, offset=4) / Address=#x0000000000000010 i1 %cmp = #x0 (0) >> Jump to %for.end SOURCE MEMORY STATE =================== NON-LOCAL BLOCKS: Block 0 > size: 0 align: 4 alloc type: 0 alive: false address: 0 Block 1 > size: 15 align: 2 alloc type: 0 alive: true address: 12 Contents: 2: pointer(non-local, block_id=2, offset=-5), byte offset=1 1: pointer(non-local, block_id=2, offset=-5), byte offset=0 *: poison Block 2 > size: 3 align: 1 alloc type: 0 alive: true address: 9 Contents: 1: poison *: poison Block 3 > size: 1 align: 1 alloc type: 0 alive: true address: 1 Block 4 > size: 2 align: 1 alloc type: 0 alive: true address: 2 Contents: 2: pointer(non-local, block_id=2, offset=-5), byte offset=1 1: pointer(non-local, block_id=2, offset=-5), byte offset=0 *: poison Block 5 > size: 5 align: 1 alloc type: 0 alive: true address: 4 Contents: 2: pointer(non-local, block_id=2, offset=-5), byte offset=1 1: pointer(non-local, block_id=2, offset=-5), byte offset=0 *: poison Target: i1 %cmp1 = #x1 (1) >> Jump to %for.body.preheader ptr %b.f = pointer(non-local, block_id=2, offset=-5) / Address=#x0000000000000004 >> Jump to %for.body ptr %a.addr.03 = pointer(non-local, block_id=1, offset=0) / Address=#x000000000000000c ptr %b.addr.02.in = pointer(non-local, block_id=2, offset=-5) / Address=#x0000000000000004 float %i1 = UB triggered! Pass: InstCombinePass 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' '-passes=instcombine' '-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_GtwVUPKF_JsZ7.bc" ------------------- SMT STATS ------------------- Num queries: 73 Num invalid: 0 Num skips: 0 Num trivial: 19 (20.7%) Num timeout: 9 (12.3%) Num errors: 0 (0.0%) Num SAT: 49 (67.1%) Num UNSAT: 15 (20.5%) Alive2: Transform doesn't verify; aborting!
RUN: at line 2: /home/nlopes/alive2/build/opt-alive.sh < /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/intptr1.ll -passes=instcombine -S | /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/intptr1.ll + /home/nlopes/alive2/build/opt-alive.sh -passes=instcombine -S + /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/intptr1.ll FileCheck error: '<stdin>' is empty. FileCheck command line: /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/intptr1.ll