aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp')
-rw-r--r--lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp b/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp
index 44a43596ee..73e5480d12 100644
--- a/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp
+++ b/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp
@@ -167,6 +167,12 @@ FixConstantOperandsForInstr(Instruction* vmInstr,
constantThatMustBeLoaded = true;
}
} else {
+ //
+ // If the operand is from the constant pool, don't try to change it.
+ //
+ if (mop.getType() == MachineOperand::MO_ConstantPoolIndex) {
+ continue;
+ }
assert(mop.isImmediate());
bool isSigned = mop.getType() == MachineOperand::MO_SignExtendedImmed;