mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-10 02:36:06 +00:00
Fix a bug where we didn't insert FP_REG_KILL instructions into MBB's that
contain FP PHI nodes but no other FP defining instructions. This fixes 183.equake git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19495 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
afce4306ec
commit
db8c368d7b
@ -331,6 +331,21 @@ namespace {
|
|||||||
// FP_REG_KILL insertion.
|
// FP_REG_KILL insertion.
|
||||||
ContainsFPCode = false;
|
ContainsFPCode = false;
|
||||||
|
|
||||||
|
// Scan the PHI nodes that already are inserted into this basic block. If
|
||||||
|
// any of them is a PHI of a floating point value, we need to insert an
|
||||||
|
// FP_REG_KILL.
|
||||||
|
SSARegMap *RegMap = BB->getParent()->getSSARegMap();
|
||||||
|
for (MachineBasicBlock::iterator I = BB->begin(), E = BB->end();
|
||||||
|
I != E; ++I) {
|
||||||
|
assert(I->getOpcode() == X86::PHI &&
|
||||||
|
"Isn't just PHI nodes?");
|
||||||
|
if (RegMap->getRegClass(I->getOperand(0).getReg()) ==
|
||||||
|
X86::RFPRegisterClass) {
|
||||||
|
ContainsFPCode = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Compute the RegPressureMap, which is an approximation for the number of
|
// Compute the RegPressureMap, which is an approximation for the number of
|
||||||
// registers required to compute each node.
|
// registers required to compute each node.
|
||||||
ComputeRegPressure(DAG.getRoot());
|
ComputeRegPressure(DAG.getRoot());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user