aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-01-15 20:32:15 +0000
committerChris Lattner <sabre@nondot.org>2003-01-15 20:32:15 +0000
commitc7c7b7ab75634145506b08e3f1cdd7a4405aad29 (patch)
treeef1c915bd15309ea9d04572e8bf599141c49643e /lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp
parentc520feb6f03d1fded623f81a71f6625728ebfab8 (diff)
Fix bug in previous checkin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5310 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp')
-rw-r--r--lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp b/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp
index 8c38a8f436..4413a25655 100644
--- a/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp
+++ b/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp
@@ -433,7 +433,8 @@ FixConstantOperandsForInstr(Instruction* vmInstr,
if (mop.getType() == MachineOperand::MO_VirtualRegister)
{
assert(mop.getVRegValue() != NULL);
- if (Constant *opConst = dyn_cast<Constant>(mop.getVRegValue())) {
+ opValue = mop.getVRegValue();
+ if (Constant *opConst = dyn_cast<Constant>(opValue)) {
opType = ChooseRegOrImmed(opConst, opCode, target,
(immedPos == (int)op), machineRegNum,
immedValue);