[llvm-commits] CVS: llvm/lib/Target/Sparc/SparcInstrInfo.cpp

Chris Lattner lattner at cs.uiuc.edu
Tue Oct 21 11:30:01 PDT 2003


Changes in directory llvm/lib/Target/Sparc:

SparcInstrInfo.cpp updated: 1.54 -> 1.55

---
Log message:

Fix preselection/lowerswitches bug


---
Diffs of the changes:  (+3 -0)

Index: llvm/lib/Target/Sparc/SparcInstrInfo.cpp
diff -u llvm/lib/Target/Sparc/SparcInstrInfo.cpp:1.54 llvm/lib/Target/Sparc/SparcInstrInfo.cpp:1.55
--- llvm/lib/Target/Sparc/SparcInstrInfo.cpp:1.54	Mon Oct 20 14:43:17 2003
+++ llvm/lib/Target/Sparc/SparcInstrInfo.cpp	Tue Oct 21 11:29:23 2003
@@ -431,6 +431,9 @@
   if (isa<ConstantPointerNull>(CV))               // can always use %g0
     return false;
 
+  if (isa<SwitchInst>(I)) // Switch instructions will be lowered!
+    return false;
+
   if (const ConstantInt* CI = dyn_cast<ConstantInt>(CV))
     return labs((int64_t)CI->getRawValue()) > MaxConstantsTable[I->getOpcode()];
 





More information about the llvm-commits mailing list