forked from OSchip/llvm-project
48 lines
1.5 KiB
LLVM
48 lines
1.5 KiB
LLVM
|
; RUN: llc -enable-machine-outliner %s -o - | FileCheck %s
|
||
|
; CHECK: OUTLINED_FUNCTION
|
||
|
; RUN: llc -enable-machine-outliner -aarch64-redzone %s -o - | FileCheck %s -check-prefix=REDZONE
|
||
|
; REDZONE-NOT: OUTLINED_FUNCTION
|
||
|
|
||
|
target triple = "arm64----"
|
||
|
|
||
|
; Ensure that the MachineOutliner does not fire on functions which use a
|
||
|
; redzone. foo() should have a redzone when compiled with -aarch64-redzone, and
|
||
|
; no redzone otherwise.
|
||
|
define void @foo() #0 {
|
||
|
%1 = alloca i32, align 4
|
||
|
%2 = alloca i32, align 4
|
||
|
%3 = alloca i32, align 4
|
||
|
%4 = alloca i32, align 4
|
||
|
store i32 0, i32* %1, align 4
|
||
|
store i32 0, i32* %2, align 4
|
||
|
store i32 0, i32* %3, align 4
|
||
|
store i32 0, i32* %4, align 4
|
||
|
%5 = load i32, i32* %1, align 4
|
||
|
%6 = add nsw i32 %5, 1
|
||
|
store i32 %6, i32* %1, align 4
|
||
|
%7 = load i32, i32* %3, align 4
|
||
|
%8 = add nsw i32 %7, 1
|
||
|
store i32 %8, i32* %3, align 4
|
||
|
%9 = load i32, i32* %4, align 4
|
||
|
%10 = add nsw i32 %9, 1
|
||
|
store i32 %10, i32* %4, align 4
|
||
|
%11 = load i32, i32* %2, align 4
|
||
|
%12 = add nsw i32 %11, 1
|
||
|
store i32 %12, i32* %2, align 4
|
||
|
%13 = load i32, i32* %1, align 4
|
||
|
%14 = add nsw i32 %13, 1
|
||
|
store i32 %14, i32* %1, align 4
|
||
|
%15 = load i32, i32* %3, align 4
|
||
|
%16 = add nsw i32 %15, 1
|
||
|
store i32 %16, i32* %3, align 4
|
||
|
%17 = load i32, i32* %4, align 4
|
||
|
%18 = add nsw i32 %17, 1
|
||
|
store i32 %18, i32* %4, align 4
|
||
|
%19 = load i32, i32* %2, align 4
|
||
|
%20 = add nsw i32 %19, -1
|
||
|
store i32 %20, i32* %2, align 4
|
||
|
ret void
|
||
|
}
|
||
|
|
||
|
attributes #0 = { noinline nounwind optnone }
|