Index: src/IceTargetLoweringMIPS32.cpp |
diff --git a/src/IceTargetLoweringMIPS32.cpp b/src/IceTargetLoweringMIPS32.cpp |
index 331f1ed4c99b6a82b3c3682f1a40810004cf6baa..01481ba99df71f534a3dc1991214d1dcb57c7361 100644 |
--- a/src/IceTargetLoweringMIPS32.cpp |
+++ b/src/IceTargetLoweringMIPS32.cpp |
@@ -4847,10 +4847,10 @@ Operand *TargetMIPS32::legalize(Operand *From, LegalMask Allowed, |
return From; |
} |
if (auto *C = llvm::dyn_cast<ConstantRelocatable>(From)) { |
- (void)C; |
- // TODO(reed kotler): complete this case for proper implementation |
Variable *Reg = makeReg(Ty, RegNum); |
- Context.insert<InstFakeDef>(Reg); |
+ Variable *TReg = makeReg(Ty, RegNum); |
+ _lui(TReg, C, RO_Hi); |
+ _addiu(Reg, TReg, C, RO_Lo); |
return Reg; |
} else if (auto *C32 = llvm::dyn_cast<ConstantInteger32>(From)) { |
const uint32_t Value = C32->getValue(); |