2006-11-28 14:14:06 +08:00
|
|
|
; The cast in this testcase is not eliminable on a 32-bit target!
|
2009-09-12 02:01:28 +08:00
|
|
|
; RUN: opt < %s -instcombine -S | grep inttoptr
|
2003-11-04 02:33:44 +08:00
|
|
|
|
2008-03-01 17:15:35 +08:00
|
|
|
target datalayout = "e-p:32:32"
|
2003-11-04 02:33:44 +08:00
|
|
|
|
2008-03-01 17:15:35 +08:00
|
|
|
declare void @foo(...)
|
2003-11-04 02:33:44 +08:00
|
|
|
|
2008-03-01 17:15:35 +08:00
|
|
|
define void @test(i64 %X) {
|
|
|
|
%Y = inttoptr i64 %X to i32* ; <i32*> [#uses=1]
|
|
|
|
call void (...)* @foo( i32* %Y )
|
|
|
|
ret void
|
2003-11-04 02:33:44 +08:00
|
|
|
}
|
2008-03-01 17:15:35 +08:00
|
|
|
|