forked from llvm-mirror/llvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Be careful about scheduling nodes above previous calls. It increase u…
…sages of more callee-saved registers and introduce copies. Only allows it if scheduling a node above calls would end up lessen register pressure. Call operands also has added ABI restrictions for register allocation, so be extra careful with hoisting them above calls. rdar://9329627 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130245 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
Evan Cheng
committed
Apr 26, 2011
1 parent
90fab0f
commit 554daa6
Showing
8 changed files
with
138 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
; RUN: llc < %s -mtriple=thumbv7-apple-ios -relocation-model=pic -mcpu=cortex-a8 | FileCheck %s | ||
|
||
; Do not move the umull above previous call which would require use of | ||
; more callee-saved registers and introduce copies. | ||
; rdar://9329627 | ||
|
||
%struct.FF = type { i32 (i32*)*, i32 (i32*, i32*, i32, i32, i32, i32)*, i32 (i32, i32, i8*)*, void ()*, i32 (i32, i8*, i32*)*, i32 ()* } | ||
%struct.BD = type { %struct.BD*, i32, i32, i32, i32, i64, i32 (%struct.BD*, i8*, i64, i32)*, i32 (%struct.BD*, i8*, i32, i32)*, i32 (%struct.BD*, i8*, i64, i32)*, i32 (%struct.BD*, i8*, i32, i32)*, i32 (%struct.BD*, i64, i32)*, [16 x i8], i64, i64 } | ||
|
||
@FuncPtr = external hidden unnamed_addr global %struct.FF* | ||
@.str1 = external hidden unnamed_addr constant [6 x i8], align 4 | ||
@G = external unnamed_addr global i32 | ||
@.str2 = external hidden unnamed_addr constant [58 x i8], align 4 | ||
@.str3 = external hidden unnamed_addr constant [58 x i8], align 4 | ||
|
||
define i32 @test() nounwind optsize ssp { | ||
entry: | ||
; CHECK: test: | ||
; CHECK: push | ||
; CHECK-NOT: push | ||
%block_size = alloca i32, align 4 | ||
%block_count = alloca i32, align 4 | ||
%index_cache = alloca i32, align 4 | ||
store i32 0, i32* %index_cache, align 4 | ||
%tmp = load i32* @G, align 4 | ||
%tmp1 = call i32 @bar(i32 0, i32 0, i32 %tmp) nounwind | ||
switch i32 %tmp1, label %bb8 [ | ||
i32 0, label %bb | ||
i32 536870913, label %bb4 | ||
i32 536870914, label %bb6 | ||
] | ||
|
||
bb: | ||
%tmp2 = load i32* @G, align 4 | ||
%tmp4 = icmp eq i32 %tmp2, 0 | ||
br i1 %tmp4, label %bb1, label %bb8 | ||
|
||
bb1: | ||
; CHECK: %bb1 | ||
; CHECK-NOT: umull | ||
; CHECK: blx _Get | ||
; CHECK: umull | ||
; CHECK: blx _foo | ||
%tmp5 = load i32* %block_size, align 4 | ||
%tmp6 = load i32* %block_count, align 4 | ||
%tmp7 = call %struct.FF* @Get() nounwind | ||
store %struct.FF* %tmp7, %struct.FF** @FuncPtr, align 4 | ||
%tmp10 = zext i32 %tmp6 to i64 | ||
%tmp11 = zext i32 %tmp5 to i64 | ||
%tmp12 = mul nsw i64 %tmp10, %tmp11 | ||
%tmp13 = call i32 @foo(i8* getelementptr inbounds ([6 x i8]* @.str1, i32 0, i32 0), i64 %tmp12, i32 %tmp5) nounwind | ||
br label %bb8 | ||
|
||
bb4: | ||
ret i32 0 | ||
|
||
bb6: | ||
ret i32 1 | ||
|
||
bb8: | ||
ret i32 -1 | ||
} | ||
|
||
declare i32 @printf(i8*, ...) | ||
|
||
declare %struct.FF* @Get() | ||
|
||
declare i32 @foo(i8*, i64, i32) | ||
|
||
declare i32 @bar(i32, i32, i32) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 0 additions & 20 deletions
20
test/CodeGen/Thumb/2010-01-15-local-alloc-spill-physical.ll
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters