From a36cdcfaf8734731c8c83df7cf6efe7e647f1fba Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Sat, 11 Nov 2006 07:19:36 +0000 Subject: [PATCH] Add all implicit defs to FP_REG_KILL mi. llvm-svn: 31674 --- llvm/lib/Target/X86/X86ISelDAGToDAG.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp b/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp index 68b89a4d160f..ddc730d9593e 100644 --- a/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp +++ b/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp @@ -525,7 +525,12 @@ void X86DAGToDAGISel::InstructionSelectBasicBlock(SelectionDAG &DAG) { // Finally, if we found any FP code, emit the FP_REG_KILL instruction. if (ContainsFPCode) { - BuildMI(*BB, BB->getFirstTerminator(), X86::FP_REG_KILL, 0); + const TargetInstrDescriptor &II= TM.getInstrInfo()->get(X86::FP_REG_KILL); + MachineInstrBuilder MIB = + BuildMI(*BB, BB->getFirstTerminator(), X86::FP_REG_KILL, 0); + for (const unsigned *ImplicitDefs = II.ImplicitDefs; + *ImplicitDefs; ++ImplicitDefs) + MIB = MIB.addReg(*ImplicitDefs, true, true); ++NumFPKill; } }