aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/X86/X86FloatingPoint.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-03-21 20:41:27 +0000
committerChris Lattner <sabre@nondot.org>2008-03-21 20:41:27 +0000
commit35831d06fdd17f42897a9931555c17af490c06ee (patch)
tree3f1d213fcbc2f1001b6f38adfbea6e031769c16a /lib/Target/X86/X86FloatingPoint.cpp
parent4c88cc9c2a2e52bd2abffa74a763c52be4c1e2e2 (diff)
Restore this assert now that the livevar bug is fixed.
This verifies kill info for "ret" fp operands is right. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48656 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86FloatingPoint.cpp')
-rw-r--r--lib/Target/X86/X86FloatingPoint.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/Target/X86/X86FloatingPoint.cpp b/lib/Target/X86/X86FloatingPoint.cpp
index 84ff640b40..3cda3006a3 100644
--- a/lib/Target/X86/X86FloatingPoint.cpp
+++ b/lib/Target/X86/X86FloatingPoint.cpp
@@ -1053,8 +1053,13 @@ void FPS::handleSpecialFP(MachineBasicBlock::iterator &I) {
MachineOperand &Op = MI->getOperand(i);
if (!Op.isReg() || Op.getReg() < X86::FP0 || Op.getReg() > X86::FP6)
continue;
-// assert(Op.isUse() && Op.isKill() &&
-// "Ret only defs operands, and values aren't live beyond it");
+ // FP Register uses must be kills unless there are two uses of the same
+ // register, in which case only one will be a kill.
+ assert(Op.isUse() &&
+ (Op.isKill() || // Marked kill.
+ getFPReg(Op) == FirstFPRegOp || // Second instance.
+ MI->killsRegister(Op.getReg())) && // Later use is marked kill.
+ "Ret only defs operands, and values aren't live beyond it");
if (FirstFPRegOp == ~0U)
FirstFPRegOp = getFPReg(Op);