blob: 4ecbccd86a48df3f0e17b3a7f681f3cee039ac0e [file] [log] [blame]
Edward O'Callaghancbf75a52009-10-12 07:18:14 +00001; RUN: opt < %s -instcombine -S | FileCheck %s
Tanya Lattneraa6f5c92008-03-09 08:16:40 +00002target datalayout = "e-p:32:32"
Chris Lattner4269e402004-07-20 05:20:39 +00003
Tanya Lattneraa6f5c92008-03-09 08:16:40 +00004define i32* @test(i32* %P) {
5 %V = ptrtoint i32* %P to i32 ; <i32> [#uses=1]
6 %P2 = inttoptr i32 %V to i32* ; <i32*> [#uses=1]
7 ret i32* %P2
Edward O'Callaghancbf75a52009-10-12 07:18:14 +00008; CHECK: ret i32* %P
Chris Lattner4269e402004-07-20 05:20:39 +00009}
Tanya Lattneraa6f5c92008-03-09 08:16:40 +000010