mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 04:02:41 +01:00
Another coalescer bug. When a dead copy is eliminated, transfer the kill to a def of the exact register rather than a super-register.
llvm-svn: 78376
This commit is contained in:
parent
5af3c8154b
commit
a565450757
@ -888,12 +888,13 @@ static void PropagateDeadness(LiveInterval &li, MachineInstr *CopyMI,
|
|||||||
MachineInstr *DefMI =
|
MachineInstr *DefMI =
|
||||||
li_->getInstructionFromIndex(li_->getDefIndex(LRStart));
|
li_->getInstructionFromIndex(li_->getDefIndex(LRStart));
|
||||||
if (DefMI && DefMI != CopyMI) {
|
if (DefMI && DefMI != CopyMI) {
|
||||||
int DeadIdx = DefMI->findRegisterDefOperandIdx(li.reg, false, tri_);
|
int DeadIdx = DefMI->findRegisterDefOperandIdx(li.reg, false);
|
||||||
if (DeadIdx != -1) {
|
if (DeadIdx != -1)
|
||||||
DefMI->getOperand(DeadIdx).setIsDead();
|
DefMI->getOperand(DeadIdx).setIsDead();
|
||||||
// A dead def should have a single cycle interval.
|
else
|
||||||
++LRStart;
|
DefMI->addOperand(MachineOperand::CreateReg(li.reg,
|
||||||
}
|
true, true, false, true));
|
||||||
|
++LRStart;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
16
test/CodeGen/Thumb2/2009-08-07-CoalescerBug.ll
Normal file
16
test/CodeGen/Thumb2/2009-08-07-CoalescerBug.ll
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
; RUN: llvm-as < %s | llc -mtriple=armv7-eabi -mattr=+vfp2
|
||||||
|
; PR4686
|
||||||
|
|
||||||
|
%a = type { i32 (...)** }
|
||||||
|
%b = type { %a }
|
||||||
|
%c = type { float, float, float, float }
|
||||||
|
|
||||||
|
declare arm_aapcs_vfpcc float @bar(%c*)
|
||||||
|
|
||||||
|
define arm_aapcs_vfpcc void @foo(%b* %x, %c* %y) {
|
||||||
|
entry:
|
||||||
|
%0 = call arm_aapcs_vfpcc float @bar(%c* %y) ; <float> [#uses=0]
|
||||||
|
%1 = fadd float undef, undef ; <float> [#uses=1]
|
||||||
|
store float %1, float* undef, align 8
|
||||||
|
ret void
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user