mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
6d2bd95ff1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199564 91177308-0d34-0410-b5e6-96231b3b80d8
28 lines
590 B
LLVM
28 lines
590 B
LLVM
; RUN: opt < %s -instcombine -S | FileCheck %s
|
|
|
|
target datalayout = "e-p:32:32"
|
|
target triple = "i686-pc-linux-gnu"
|
|
|
|
define i32 @main() {
|
|
; CHECK-LABEL: @main
|
|
; CHECK: call i32 bitcast
|
|
entry:
|
|
%tmp = call i32 bitcast (i8* (i32*)* @ctime to i32 (i32*)*)( i32* null ) ; <i32> [#uses=1]
|
|
ret i32 %tmp
|
|
}
|
|
|
|
declare i8* @ctime(i32*)
|
|
|
|
define internal { i8 } @foo(i32*) {
|
|
entry:
|
|
ret { i8 } { i8 0 }
|
|
}
|
|
|
|
define void @test_struct_ret() {
|
|
; CHECK-LABEL: @test_struct_ret
|
|
; CHECK-NOT: bitcast
|
|
entry:
|
|
%0 = call { i8 } bitcast ({ i8 } (i32*)* @foo to { i8 } (i16*)*)(i16* null)
|
|
ret void
|
|
}
|