Sign in
llvm
/
llvm-project
/
llvm
/
b72b4128f221fd5086a1ae46aba7b2fcbf0d6384
/
.
/
test
/
Transforms
/
InstCombine
/
IntPtrCast.ll
blob: a86d7ccde8b605ea1bbfd215a9c4b6e9361d767d [
file
] [
log
] [
blame
]
; RUN: opt < %s -passes=instcombine -S | FileCheck %s
target
datalayout
=
"e-p:32:32"
define
ptr
@test
(
ptr
%P
)
{
%V
=
ptrtoint
ptr
%P
to
i32
; <i32> [#uses=1]
%P2
=
inttoptr
i32
%V
to
ptr
; <ptr> [#uses=1]
ret
ptr
%P2
; CHECK: ret ptr %P
}