mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-12 01:25:10 +00:00
This situation can occur:
,------. | | | v | t2 = phi ... t1 ... | | | v | t1 = ... | ... = ... t1 ... | | `------' where there is a use in a PHI node that's a predecessor to the defining block. We don't want to mark all predecessors as having the value "alive" in this case. Also, the assert was too restrictive and didn't handle this case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52655 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -139,8 +139,23 @@ void LiveVariables::HandleVirtRegUse(unsigned reg, MachineBasicBlock *MBB,
|
||||
assert(VRInfo.Kills[i]->getParent() != MBB && "entry should be at end!");
|
||||
#endif
|
||||
|
||||
assert(MBB != MRI->getVRegDef(reg)->getParent() &&
|
||||
"Should have kill for defblock!");
|
||||
// This situation can occur:
|
||||
//
|
||||
// ,------.
|
||||
// | |
|
||||
// | v
|
||||
// | t2 = phi ... t1 ...
|
||||
// | |
|
||||
// | v
|
||||
// | t1 = ...
|
||||
// | ... = ... t1 ...
|
||||
// | |
|
||||
// `------'
|
||||
//
|
||||
// where there is a use in a PHI node that's a predecessor to the defining
|
||||
// block. We don't want to mark all predecessors as having the value "alive"
|
||||
// in this case.
|
||||
if (MBB == MRI->getVRegDef(reg)->getParent()) return;
|
||||
|
||||
// Add a new kill entry for this basic block. If this virtual register is
|
||||
// already marked as alive in this basic block, that means it is alive in at
|
||||
|
Reference in New Issue
Block a user