X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=test%2FTransforms%2FInstCombine%2FIntPtrCast.ll;h=4ecbccd86a48df3f0e17b3a7f681f3cee039ac0e;hb=2920a71663b96f2c33b1fee09ca5ca9f5dc1cf12;hp=9f509b6fbc0ac763e1c960adf1390130f5997521;hpb=69ccadd7535a83b348595cf603126e6a68b2883b;p=oota-llvm.git diff --git a/test/Transforms/InstCombine/IntPtrCast.ll b/test/Transforms/InstCombine/IntPtrCast.ll index 9f509b6fbc0..4ecbccd86a4 100644 --- a/test/Transforms/InstCombine/IntPtrCast.ll +++ b/test/Transforms/InstCombine/IntPtrCast.ll @@ -1,8 +1,10 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | notcast -target pointersize = 32 +; RUN: opt < %s -instcombine -S | FileCheck %s +target datalayout = "e-p:32:32" -int *%test(int *%P) { - %V = cast int* %P to int - %P2 = cast int %V to int* - ret int* %P2 +define i32* @test(i32* %P) { + %V = ptrtoint i32* %P to i32 ; [#uses=1] + %P2 = inttoptr i32 %V to i32* ; [#uses=1] + ret i32* %P2 +; CHECK: ret i32* %P } +