aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/SparcV9/InstrSelection/InstrSelectionSupport.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/SparcV9/InstrSelection/InstrSelectionSupport.cpp')
-rw-r--r--lib/Target/SparcV9/InstrSelection/InstrSelectionSupport.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Target/SparcV9/InstrSelection/InstrSelectionSupport.cpp b/lib/Target/SparcV9/InstrSelection/InstrSelectionSupport.cpp
index 131107b..a792386 100644
--- a/lib/Target/SparcV9/InstrSelection/InstrSelectionSupport.cpp
+++ b/lib/Target/SparcV9/InstrSelection/InstrSelectionSupport.cpp
@@ -71,7 +71,8 @@ ChooseRegOrImmed(int64_t intValue,
opType = isSigned? MachineOperand::MO_SignExtendedImmed
: MachineOperand::MO_UnextendedImmed;
getImmedValue = intValue;
- } else if (intValue == 0 && target.getRegInfo().getZeroRegNum() >= 0) {
+ } else if (intValue == 0 &&
+ target.getRegInfo().getZeroRegNum() != (unsigned)-1) {
opType = MachineOperand::MO_MachineRegister;
getMachineRegNum = target.getRegInfo().getZeroRegNum();
}