summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/PowerPC/2008-03-18-RegScavengerAssert.ll
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
commit44c0b4f754fb2aada90aa88a57f5cd9b526a912a (patch)
treed036fea823a17555ec2983c620f62602befc14f6 /llvm/test/CodeGen/PowerPC/2008-03-18-RegScavengerAssert.ll
parentaf75ab81303cd875704ffbe4e4115badbcd6bd93 (diff)
downloadbcm5719-llvm-44c0b4f754fb2aada90aa88a57f5cd9b526a912a.tar.gz
bcm5719-llvm-44c0b4f754fb2aada90aa88a57f5cd9b526a912a.zip
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. llvm-svn: 48521
Diffstat (limited to 'llvm/test/CodeGen/PowerPC/2008-03-18-RegScavengerAssert.ll')
-rw-r--r--llvm/test/CodeGen/PowerPC/2008-03-18-RegScavengerAssert.ll6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/PowerPC/2008-03-18-RegScavengerAssert.ll b/llvm/test/CodeGen/PowerPC/2008-03-18-RegScavengerAssert.ll
new file mode 100644
index 00000000000..061c585c747
--- /dev/null
+++ b/llvm/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
+}
OpenPOWER on IntegriCloud