[llvm-commits] CVS: llvm/lib/Target/X86/InstSelectSimple.cpp
Alkis Evlogimenos
alkis at cs.uiuc.edu
Sat Dec 20 11:29:01 PST 2003
Changes in directory llvm/lib/Target/X86:
InstSelectSimple.cpp updated: 1.143 -> 1.144
---
Log message:
Move FP_REG_KILL closer to the actual branch instruction.
---
Diffs of the changes: (+5 -2)
Index: llvm/lib/Target/X86/InstSelectSimple.cpp
diff -u llvm/lib/Target/X86/InstSelectSimple.cpp:1.143 llvm/lib/Target/X86/InstSelectSimple.cpp:1.144
--- llvm/lib/Target/X86/InstSelectSimple.cpp:1.143 Sat Dec 20 10:22:59 2003
+++ llvm/lib/Target/X86/InstSelectSimple.cpp Sat Dec 20 11:28:15 2003
@@ -883,11 +883,12 @@
///
void ISel::visitBranchInst(BranchInst &BI) {
BasicBlock *NextBB = getBlockAfter(BI.getParent()); // BB after current one
- BuildMI(BB, X86::FP_REG_KILL, 0);
if (!BI.isConditional()) { // Unconditional branch?
- if (BI.getSuccessor(0) != NextBB)
+ if (BI.getSuccessor(0) != NextBB) {
+ BuildMI(BB, X86::FP_REG_KILL, 0);
BuildMI(BB, X86::JMP, 1).addPCDisp(BI.getSuccessor(0));
+ }
return;
}
@@ -898,6 +899,7 @@
// computed some other way...
unsigned condReg = getReg(BI.getCondition());
BuildMI(BB, X86::CMPri8, 2).addReg(condReg).addZImm(0);
+ BuildMI(BB, X86::FP_REG_KILL, 0);
if (BI.getSuccessor(1) == NextBB) {
if (BI.getSuccessor(0) != NextBB)
BuildMI(BB, X86::JNE, 1).addPCDisp(BI.getSuccessor(0));
@@ -936,6 +938,7 @@
X86::JS, X86::JNS },
};
+ BuildMI(BB, X86::FP_REG_KILL, 0);
if (BI.getSuccessor(0) != NextBB) {
BuildMI(BB, OpcodeTab[isSigned][OpNum], 1).addPCDisp(BI.getSuccessor(0));
if (BI.getSuccessor(1) != NextBB)
More information about the llvm-commits
mailing list