[llvm-commits] CVS: llvm/lib/Target/X86/InstSelectSimple.cpp
Alkis Evlogimenos
alkis at cs.uiuc.edu
Thu Feb 26 16:01:38 PST 2004
Changes in directory llvm/lib/Target/X86:
InstSelectSimple.cpp updated: 1.179 -> 1.180
---
Log message:
Uncomment assertions that register# != 0 on calls to
MRegisterInfo::is{Physical,Virtual}Register. Apply appropriate fixes
to relevant files.
---
Diffs of the changes: (+5 -4)
Index: llvm/lib/Target/X86/InstSelectSimple.cpp
diff -u llvm/lib/Target/X86/InstSelectSimple.cpp:1.179 llvm/lib/Target/X86/InstSelectSimple.cpp:1.180
--- llvm/lib/Target/X86/InstSelectSimple.cpp:1.179 Wed Feb 25 19:20:02 2004
+++ llvm/lib/Target/X86/InstSelectSimple.cpp Thu Feb 26 16:00:19 2004
@@ -696,14 +696,15 @@
for (MachineFunction::iterator BB = F->begin(), E = F->end(); BB != E; ++BB) {
for (MachineBasicBlock::iterator I = BB->begin(), E = BB->end(); I!=E; ++I)
- for (unsigned i = 0, e = I->getNumOperands(); i != e; ++i)
- if (I->getOperand(i).isRegister()) {
- unsigned Reg = I->getOperand(i).getReg();
+ for (unsigned i = 0, e = I->getNumOperands(); i != e; ++i) {
+ MachineOperand& MO = I->getOperand(i);
+ if (MO.isRegister() && MO.getReg()) {
+ unsigned Reg = MO.getReg();
if (MRegisterInfo::isVirtualRegister(Reg))
if (RegMap.getRegClass(Reg)->getSize() == 10)
goto UsesFPReg;
}
-
+ }
// If we haven't found an FP register use or def in this basic block, check
// to see if any of our successors has an FP PHI node, which will cause a
// copy to be inserted into this block.
More information about the llvm-commits
mailing list