[PATCH] Ensure that TCReturn instructions are resolved
Tim Northover
t.p.northover at gmail.com
Fri Nov 28 06:40:13 PST 2014
Thanks for updating the test. It's usually better to test the actual output rather than just that a function doesn't crash though.
I'd suggest something like (untested):
; 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: b {{r[0-9]+}}
%func = load void()** @ind_func
tail call cc10 void()* @%func()
ret void
}
This also avoids leaving a stray .s file in the source directory and tests both TCRETURNdi and TCRETURNri.
http://reviews.llvm.org/D6445
More information about the llvm-commits
mailing list