mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-17 02:38:16 +00:00
Unallocatable registers do not have live intervals.
llvm-svn: 56287
This commit is contained in:
parent
88efee2dcc
commit
d3225118a6
@ -568,7 +568,9 @@ SimpleRegisterCoalescing::UpdateRegDefsUses(unsigned SrcReg, unsigned DstReg,
|
||||
unsigned CopySrcReg, CopyDstReg;
|
||||
if (TID.getNumDefs() == 1 && TID.getNumOperands() > 2 &&
|
||||
tii_->isMoveInstr(*UseMI, CopySrcReg, CopyDstReg) &&
|
||||
CopySrcReg != CopyDstReg) {
|
||||
CopySrcReg != CopyDstReg &&
|
||||
(TargetRegisterInfo::isVirtualRegister(CopyDstReg) ||
|
||||
allocatableRegs_[CopyDstReg])) {
|
||||
LiveInterval &LI = li_->getInterval(CopyDstReg);
|
||||
unsigned DefIdx = li_->getDefIndex(li_->getInstructionIndex(UseMI));
|
||||
const LiveRange *DLR = LI.getLiveRangeContaining(DefIdx);
|
||||
|
17
test/CodeGen/ARM/2008-09-17-CoalescerBug.ll
Normal file
17
test/CodeGen/ARM/2008-09-17-CoalescerBug.ll
Normal file
@ -0,0 +1,17 @@
|
||||
; RUN: llvm-as < %s | llc -mtriple=arm-apple-darwin
|
||||
|
||||
define void @gcov_exit() nounwind {
|
||||
entry:
|
||||
br i1 false, label %bb24, label %bb33.thread
|
||||
|
||||
bb24: ; preds = %entry
|
||||
br label %bb39
|
||||
|
||||
bb33.thread: ; preds = %entry
|
||||
%0 = alloca i8, i32 0 ; <i8*> [#uses=1]
|
||||
br label %bb39
|
||||
|
||||
bb39: ; preds = %bb33.thread, %bb24
|
||||
%.reg2mem.0 = phi i8* [ %0, %bb33.thread ], [ null, %bb24 ] ; <i8*> [#uses=0]
|
||||
ret void
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user