[llvm-commits] CVS: llvm/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp
Vikram Adve
vadve at cs.uiuc.edu
Sun Jul 6 15:34:01 PDT 2003
Changes in directory llvm/lib/CodeGen/InstrSelection:
InstrSelectionSupport.cpp updated: 1.51 -> 1.52
---
Log message:
Choose register instead of immediate for ConstantExpr in ChooseRegOrImmed.
---
Diffs of the changes:
Index: llvm/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp
diff -u llvm/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp:1.51 llvm/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp:1.52
--- llvm/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp:1.51 Fri Jun 6 21:34:43 2003
+++ llvm/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp Sun Jul 6 15:33:21 2003
@@ -91,9 +91,10 @@
// To use reg or immed, constant needs to be integer, bool, or a NULL pointer
Constant *CPV = dyn_cast<Constant>(val);
- if (CPV == NULL ||
- (! CPV->getType()->isIntegral() &&
- ! (isa<PointerType>(CPV->getType()) && CPV->isNullValue())))
+ if (CPV == NULL
+ || CPV->isConstantExpr()
+ || (! CPV->getType()->isIntegral() &&
+ ! (isa<PointerType>(CPV->getType()) && CPV->isNullValue())))
return MachineOperand::MO_VirtualRegister;
// Now get the constant value and check if it fits in the IMMED field.
More information about the llvm-commits
mailing list