2017-03-14 02:39:33 +08:00
|
|
|
; RUN: llc -enable-machine-outliner -mtriple=x86_64-apple-darwin < %s | FileCheck %s
|
|
|
|
|
|
|
|
@x = common local_unnamed_addr global i32 0, align 4
|
|
|
|
|
|
|
|
define i32 @foo0(i32) local_unnamed_addr #0 {
|
|
|
|
; CHECK-LABEL: _foo0:
|
2018-04-04 05:36:00 +08:00
|
|
|
; CHECK: jmp
|
|
|
|
; CHECK-SAME: OUTLINED_FUNCTION_0
|
2017-03-14 02:39:33 +08:00
|
|
|
; CHECK-NEXT: .cfi_endproc
|
|
|
|
store i32 0, i32* @x, align 4, !tbaa !2
|
|
|
|
%2 = tail call i32 @ext(i32 1) #2
|
|
|
|
ret i32 undef
|
|
|
|
}
|
|
|
|
|
|
|
|
declare i32 @ext(i32) local_unnamed_addr #1
|
|
|
|
|
|
|
|
define i32 @foo1(i32) local_unnamed_addr #0 {
|
|
|
|
; CHECK-LABEL: _foo1:
|
2018-04-04 05:36:00 +08:00
|
|
|
; CHECK: jmp
|
|
|
|
; CHECK-SAME: OUTLINED_FUNCTION_0
|
2017-03-14 02:39:33 +08:00
|
|
|
; CHECK-NEXT: .cfi_endproc
|
|
|
|
store i32 0, i32* @x, align 4, !tbaa !2
|
|
|
|
%2 = tail call i32 @ext(i32 1) #2
|
|
|
|
ret i32 undef
|
|
|
|
}
|
|
|
|
|
|
|
|
attributes #0 = { noredzone nounwind ssp uwtable "no-frame-pointer-elim"="false" }
|
|
|
|
|
|
|
|
!2 = !{!3, !3, i64 0}
|
|
|
|
!3 = !{!"int", !4, i64 0}
|
|
|
|
!4 = !{!"omnipotent char", !5, i64 0}
|
|
|
|
!5 = !{!"Simple C/C++ TBAA"}
|
|
|
|
|
2018-04-04 05:36:00 +08:00
|
|
|
; CHECK: OUTLINED_FUNCTION_0:
|
|
|
|
; CHECK-DAG: movl $0, (%rax)
|
2017-03-14 02:39:33 +08:00
|
|
|
; CHECK-NEXT: movl $1, %edi
|
2017-11-29 01:15:09 +08:00
|
|
|
; CHECK-NEXT: jmp _ext
|