From c7c7b7ab75634145506b08e3f1cdd7a4405aad29 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 15 Jan 2003 20:32:15 +0000 Subject: [PATCH] Fix bug in previous checkin git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5310 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp | 3 ++- lib/Target/SparcV9/InstrSelection/InstrSelectionSupport.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp b/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp index 8c38a8f436b..4413a25655b 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(mop.getVRegValue())) { + opValue = mop.getVRegValue(); + if (Constant *opConst = dyn_cast(opValue)) { opType = ChooseRegOrImmed(opConst, opCode, target, (immedPos == (int)op), machineRegNum, immedValue); diff --git a/lib/Target/SparcV9/InstrSelection/InstrSelectionSupport.cpp b/lib/Target/SparcV9/InstrSelection/InstrSelectionSupport.cpp index 8c38a8f436b..4413a25655b 100644 --- a/lib/Target/SparcV9/InstrSelection/InstrSelectionSupport.cpp +++ b/lib/Target/SparcV9/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(mop.getVRegValue())) { + opValue = mop.getVRegValue(); + if (Constant *opConst = dyn_cast(opValue)) { opType = ChooseRegOrImmed(opConst, opCode, target, (immedPos == (int)op), machineRegNum, immedValue); -- 2.34.1