2015-01-04 05:35:00 +08:00
|
|
|
; RUN: llc -mtriple thumbv7-windows-coff -filetype asm -o - %s | FileCheck %s -check-prefix CHECK-COFF
|
2016-05-11 03:17:47 +08:00
|
|
|
; RUN: llc -mtriple thumbv7-elf -filetype asm -o - %s | FileCheck %s -check-prefix CHECK-OTHER
|
|
|
|
; RUN: llc -mtriple thumbv7-macho -filetype asm -o - %s | FileCheck %s -check-prefix CHECK-OTHER
|
2015-01-04 05:35:00 +08:00
|
|
|
|
|
|
|
declare i8* @f()
|
|
|
|
declare extern_weak i8* @g(i8*)
|
|
|
|
|
|
|
|
; weak symbol resolution occurs statically in PE/COFF, ensure that we permit
|
|
|
|
; tail calls on weak externals when targeting a COFF environment.
|
|
|
|
define void @test() {
|
|
|
|
%call = tail call i8* @f()
|
|
|
|
%call1 = tail call i8* @g(i8* %call)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; CHECK-COFF: b g
|
2016-05-11 03:17:47 +08:00
|
|
|
; CHECK-OTHER: bl {{_?}}g
|
2015-01-04 05:35:00 +08:00
|
|
|
|