diff options
Diffstat (limited to 'test/Transforms/InstCombine/IntPtrCast.ll')
-rw-r--r-- | test/Transforms/InstCombine/IntPtrCast.ll | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/IntPtrCast.ll b/test/Transforms/InstCombine/IntPtrCast.ll new file mode 100644 index 0000000000000..e24d199f8c45a --- /dev/null +++ b/test/Transforms/InstCombine/IntPtrCast.ll @@ -0,0 +1,9 @@ +; RUN: llvm-as < %s | opt -instcombine | llvm-dis | notcast +target datalayout = "e-p:32:32" + +define i32* @test(i32* %P) { + %V = ptrtoint i32* %P to i32 ; <i32> [#uses=1] + %P2 = inttoptr i32 %V to i32* ; <i32*> [#uses=1] + ret i32* %P2 +} + |