mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-24 06:30:19 +00:00
ca8a2aa921
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127027 91177308-0d34-0410-b5e6-96231b3b80d8
27 lines
706 B
LLVM
27 lines
706 B
LLVM
; RUN: llc -march=mipsel < %s | FileCheck %s
|
|
|
|
@reg = common global i8* null, align 4
|
|
|
|
define i8* @dummy(i8* %x) nounwind readnone noinline {
|
|
entry:
|
|
ret i8* %x
|
|
}
|
|
|
|
; CHECK: lw $2, %got($tmp1)($gp)
|
|
; CHECK: addiu $4, $2, %lo($tmp1)
|
|
; CHECK: lw $2, %got($tmp2)($gp)
|
|
; CHECK: addiu $2, $2, %lo($tmp2)
|
|
define void @f() nounwind {
|
|
entry:
|
|
%call = tail call i8* @dummy(i8* blockaddress(@f, %baz))
|
|
indirectbr i8* %call, [label %baz, label %foo]
|
|
|
|
foo: ; preds = %foo, %entry
|
|
store i8* blockaddress(@f, %foo), i8** @reg, align 4
|
|
br label %foo
|
|
|
|
baz: ; preds = %entry
|
|
store i8* null, i8** @reg, align 4
|
|
ret void
|
|
}
|