mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-22 07:24:47 +00:00
ARM: lower tail calls correctly when using GHC calling convention.
Patch by Ben Gamari. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223055 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
21
test/CodeGen/ARM/ghc-tcreturn-lowered.ll
Normal file
21
test/CodeGen/ARM/ghc-tcreturn-lowered.ll
Normal file
@@ -0,0 +1,21 @@
|
||||
; RUN: llc -mtriple=thumbv7-eabi -o - %s | FileCheck %s
|
||||
|
||||
declare cc 10 void @g()
|
||||
|
||||
define cc 10 void @test_direct_tail() {
|
||||
; CHECK-LABEL: test_direct_tail:
|
||||
; CHECK: b g
|
||||
|
||||
tail call cc10 void @g()
|
||||
ret void
|
||||
}
|
||||
|
||||
@ind_func = global void()* zeroinitializer
|
||||
|
||||
define cc 10 void @test_indirect_tail() {
|
||||
; CHECK-LABEL: test_indirect_tail:
|
||||
; CHECK: bx {{r[0-9]+}}
|
||||
%func = load void()** @ind_func
|
||||
tail call cc10 void()* %func()
|
||||
ret void
|
||||
}
|
Reference in New Issue
Block a user