summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/FloatingPoint.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-06-11 04:49:02 +0000
committerChris Lattner <sabre@nondot.org>2004-06-11 04:49:02 +0000
commitb35f47627dd9fa38767196db6c0222839ef894aa (patch)
treed079134a34734c79842c50609c32e2db32e3b6b1 /llvm/lib/Target/X86/FloatingPoint.cpp
parent0876edf122cff8d0d1502f8dfbddf4596f59ff64 (diff)
downloadbcm5719-llvm-b35f47627dd9fa38767196db6c0222839ef894aa.tar.gz
bcm5719-llvm-b35f47627dd9fa38767196db6c0222839ef894aa.zip
Now that compare instructions aren't lumped in with the other twoargfp instructions,
we can get rid of the FpUCOM/FpUCOMi pseudo instructions, which makes stuff simpler and faster. llvm-svn: 14144
Diffstat (limited to 'llvm/lib/Target/X86/FloatingPoint.cpp')
-rw-r--r--llvm/lib/Target/X86/FloatingPoint.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/llvm/lib/Target/X86/FloatingPoint.cpp b/llvm/lib/Target/X86/FloatingPoint.cpp
index ceb3bf62c16..ab6d77b77dd 100644
--- a/llvm/lib/Target/X86/FloatingPoint.cpp
+++ b/llvm/lib/Target/X86/FloatingPoint.cpp
@@ -614,7 +614,7 @@ void FPS::handleTwoArgFP(MachineBasicBlock::iterator &I) {
delete MI; // Remove the old instruction
}
-/// handleCompareFP - Handle FpUCOM and FpUCOMI instructions, which have two FP
+/// handleCompareFP - Handle FUCOM and FUCOMI instructions, which have two FP
/// register arguments and no explicit destinations.
///
void FPS::handleCompareFP(MachineBasicBlock::iterator &I) {
@@ -623,7 +623,7 @@ void FPS::handleCompareFP(MachineBasicBlock::iterator &I) {
MachineInstr *MI = I;
unsigned NumOperands = MI->getNumOperands();
- assert(NumOperands == 2 && "Illegal FpUCOM* instruction!");
+ assert(NumOperands == 2 && "Illegal FUCOM* instruction!");
unsigned Op0 = getFPReg(MI->getOperand(NumOperands-2));
unsigned Op1 = getFPReg(MI->getOperand(NumOperands-1));
bool KillsOp0 = false, KillsOp1 = false;
@@ -638,15 +638,9 @@ void FPS::handleCompareFP(MachineBasicBlock::iterator &I) {
// anywhere.
moveToTop(Op0, I);
- // Replace the old instruction with a new instruction
- MBB->remove(I++);
- unsigned Opcode = MI->getOpcode() == X86::FpUCOM ? X86::FUCOMr : X86::FUCOMIr;
- I = BuildMI(*MBB, I, Opcode, 1).addReg(getSTReg(Op1));
-
// If any of the operands are killed by this instruction, free them.
if (KillsOp0) freeStackSlotAfter(I, Op0);
if (KillsOp1 && Op0 != Op1) freeStackSlotAfter(I, Op1);
- delete MI; // Remove the old instruction
}
/// handleCondMovFP - Handle two address conditional move instructions. These
OpenPOWER on IntegriCloud