From 97a51300996b99fe55d568c339748538e65f4d98 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Wed, 19 Mar 2008 00:52:20 +0000 Subject: 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 ... 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 --- test/CodeGen/PowerPC/2008-03-18-RegScavengerAssert.ll | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 test/CodeGen/PowerPC/2008-03-18-RegScavengerAssert.ll (limited to 'test/CodeGen/PowerPC') 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 +} -- cgit v1.1