IntPtrCast.ll 287 B

12345678910
  1. ; RUN: opt < %s -instcombine -S | FileCheck %s
  2. target datalayout = "e-p:32:32"
  3. define i32* @test(i32* %P) {
  4. %V = ptrtoint i32* %P to i32 ; <i32> [#uses=1]
  5. %P2 = inttoptr i32 %V to i32* ; <i32*> [#uses=1]
  6. ret i32* %P2
  7. ; CHECK: ret i32* %P
  8. }