From ea48d9cd13752e75d79357acc0965bd42bcb41e5 Mon Sep 17 00:00:00 2001 From: John Criswell Date: Wed, 10 Dec 2003 22:51:41 +0000 Subject: [PATCH] This appears to fix Bug 172 and does not break any other feature tests or regression tests. llvm-svn: 10388 --- lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp b/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp index 44a43596ee3..73e5480d122 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;