Test source: git
Source: <stdin> -- 1. ModuleToFunctionPassAdaptor -- 1. PassManager<Function> : Skipping NOP -- 2. InstCombinePass ---------------------------------------- define ptr @test(ptr %P) { #0: %V = ptrtoint ptr %P to i32 %P2 = int2ptr i32 %V to ptr ret ptr %P2 } Transformation seems to be correct! (syntactically equal) -- 3. InstCombinePass ---------------------------------------- define ptr @test(ptr %P) { #0: %V = ptrtoint ptr %P to i32 %P2 = int2ptr i32 %V to ptr ret ptr %P2 } => define ptr @test(ptr %P) { #0: ret ptr %P } Transformation doesn't verify! (unsound) ERROR: Value mismatch Example: ptr %P = pointer(non-local, block_id=0, offset=1) / Address=#x00000001 Source: i32 %V = #x00000001 (1) ptr %P2 = phy-ptr(addr=1) / Address=#x00000001 SOURCE MEMORY STATE =================== NON-LOCAL BLOCKS: Block 0 > size: 0 align: 1 alloc type: 0 alive: false address: 0 Block 1 > size: 2147483642 align: 1 alloc type: 0 alive: true address: 7 Block 2 > size: 2147483642 align: 1 alloc type: 0 alive: true Target: Source value: phy-ptr(addr=1) / Address=#x00000001 Target value: pointer(non-local, block_id=0, offset=1) / Address=#x00000001 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_6eZ3uqlS_uFF1.bc" ------------------- SMT STATS ------------------- Num queries: 15 Num invalid: 0 Num skips: 0 Num trivial: 8 (34.8%) Num timeout: 0 (0.0%) Num errors: 0 (0.0%) Num SAT: 12 (80.0%) Num UNSAT: 3 (20.0%) Alive2: Transform doesn't verify; aborting!
RUN: at line 1: /home/nlopes/alive2/build/opt-alive.sh < /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/IntPtrCast.ll -passes=instcombine -S | /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/IntPtrCast.ll + /home/nlopes/alive2/build/opt-alive.sh -passes=instcombine -S + /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/IntPtrCast.ll FileCheck error: '<stdin>' is empty. FileCheck command line: /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/IntPtrCast.ll