Test source: git
Source: <stdin>
-- 1. ModuleToFunctionPassAdaptor
-- 1. PassManager<llvm::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 = undef
Source:
i32 %V = #x00000003 (3) [based on undef]
ptr %P2 = phy-ptr(addr=3) / Address=#x00000003 [based on undef]
SOURCE MEMORY STATE
===================
NON-LOCAL BLOCKS:
Block 0 > size: 0 align: 1 alloc type: 0 alive: false address: 0
Block 1 > size: 1342772449 align: 4 alloc type: 0 alive: true address: 12
Block 2 > size: 8 align: 1 alloc type: 0 alive: true address: 1
Target:
Source value: phy-ptr(addr=3) / Address=#x00000003 [based on undef]
Target value: pointer(non-local, block_id=3, offset=272984245) / Address=#x4792e275
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_knptKMAg_vCVO.bc"
------------------- SMT STATS -------------------
Num queries: 13
Num invalid: 0
Num skips: 0
Num trivial: 8 (38.1%)
Num timeout: 0 (0.0%)
Num errors: 0 (0.0%)
Num SAT: 9 (69.2%)
Num UNSAT: 4 (30.8%)
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