[llvm-commits] [llvm] r48656 - /llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp
Chris Lattner
sabre at nondot.org
Fri Mar 21 13:41:27 PDT 2008
Author: lattner
Date: Fri Mar 21 15:41:27 2008
New Revision: 48656
URL: http://llvm.org/viewvc/llvm-project?rev=48656&view=rev
Log:
Restore this assert now that the livevar bug is fixed.
This verifies kill info for "ret" fp operands is right.
Modified:
llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp
Modified: llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp?rev=48656&r1=48655&r2=48656&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp Fri Mar 21 15:41:27 2008
@@ -1053,8 +1053,13 @@
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);
More information about the llvm-commits
mailing list