aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/PowerPC
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-03-19 00:52:20 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-03-19 00:52:20 +0000
commit97a51300996b99fe55d568c339748538e65f4d98 (patch)
tree58346f7d32ee180ed7ae37c0e3c36c25562606f7 /test/CodeGen/PowerPC
parent8d7db68354b10998a9ec3072f4eeee05c9c0c67e (diff)
downloadexternal_llvm-97a51300996b99fe55d568c339748538e65f4d98.zip
external_llvm-97a51300996b99fe55d568c339748538e65f4d98.tar.gz
external_llvm-97a51300996b99fe55d568c339748538e65f4d98.tar.bz2
Fix live variables issues:
1. If part of a register is re-defined, an implicit kill and an implicit def are added to denote read / mod / write. However, this should only be necessary if the register is actually read later. This is a performance issue. 2. If a sub-register is being defined, and it doesn't have a previous use, do not add a implicit kill to the last use of a super-register: = EAX, AX<imp-use,kill> ... AX = In this case, EAX is live but AX is killed, this is wrong and will cause the coalescer to do bad things. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48521 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/PowerPC')
-rw-r--r--test/CodeGen/PowerPC/2008-03-18-RegScavengerAssert.ll6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/CodeGen/PowerPC/2008-03-18-RegScavengerAssert.ll b/test/CodeGen/PowerPC/2008-03-18-RegScavengerAssert.ll
new file mode 100644
index 0000000..061c585
--- /dev/null
+++ b/test/CodeGen/PowerPC/2008-03-18-RegScavengerAssert.ll
@@ -0,0 +1,6 @@
+; RUN: llvm-as < %s | llc -march=ppc64 -enable-ppc64-regscavenger
+
+define i16 @test(i8* %d1, i16* %d2) {
+ %tmp237 = call i16 asm "lhbrx $0, $2, $1", "=r,r,bO,m"( i8* %d1, i32 0, i16* %d2 )
+ ret i16 %tmp237
+}