diff options
author | Hal Finkel <hfinkel@anl.gov> | 2011-12-30 00:34:00 +0000 |
---|---|---|
committer | Hal Finkel <hfinkel@anl.gov> | 2011-12-30 00:34:00 +0000 |
commit | 2e95afa04cd1c89de7e4abaeead66cd8e51ec929 (patch) | |
tree | 9d3c5d3643df8e1a13804999ee6170ce76241bff /test/CodeGen/PowerPC/2010-02-12-saveCR.ll | |
parent | ed23bdb65fe86cdb7a38c8c1998ec965e6973966 (diff) | |
download | llvm-2e95afa04cd1c89de7e4abaeead66cd8e51ec929.tar.gz llvm-2e95afa04cd1c89de7e4abaeead66cd8e51ec929.tar.bz2 llvm-2e95afa04cd1c89de7e4abaeead66cd8e51ec929.tar.xz |
Cleanup stack/frame register define/kill states. This fixes two bugs:
1. The ST*UX instructions that store and update the stack pointer did not set define/kill on R1. This became a problem when I activated post-RA scheduling (and had incorrectly adjusted the Frames-large test).
2. eliminateFrameIndex did not kill its scavenged temporary register, and this could cause the scavenger to exhaust all available registers (and its emergency spill slot) when there were a lot of CR values to spill. The 2010-02-12-saveCR test has been adjusted to check for this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147359 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/PowerPC/2010-02-12-saveCR.ll')
-rw-r--r-- | test/CodeGen/PowerPC/2010-02-12-saveCR.ll | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/CodeGen/PowerPC/2010-02-12-saveCR.ll b/test/CodeGen/PowerPC/2010-02-12-saveCR.ll index 3c0193891e..974a99a52c 100644 --- a/test/CodeGen/PowerPC/2010-02-12-saveCR.ll +++ b/test/CodeGen/PowerPC/2010-02-12-saveCR.ll @@ -6,16 +6,22 @@ target triple = "powerpc-apple-darwin9.6" define void @foo() nounwind { entry: +;CHECK: mfcr r2 ;CHECK: lis r3, 1 +;CHECK: rlwinm r2, r2, 8, 0, 31 ;CHECK: ori r3, r3, 34524 +;CHECK: stwx r2, r1, r3 +; Make sure that the register scavenger returns the same temporary register. ;CHECK: mfcr r2 -;CHECK: rlwinm r2, r2, 8, 0, 31 +;CHECK: lis r3, 1 +;CHECK: rlwinm r2, r2, 12, 0, 31 +;CHECK: ori r3, r3, 34520 ;CHECK: stwx r2, r1, r3 %x = alloca [100000 x i8] ; <[100000 x i8]*> [#uses=1] %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0] %x1 = bitcast [100000 x i8]* %x to i8* ; <i8*> [#uses=1] call void @bar(i8* %x1) nounwind - call void asm sideeffect "", "~{cr2}"() nounwind + call void asm sideeffect "", "~{cr2},~{cr3}"() nounwind br label %return return: ; preds = %entry |