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