| Index: src/IceTargetLoweringMIPS32.cpp
|
| diff --git a/src/IceTargetLoweringMIPS32.cpp b/src/IceTargetLoweringMIPS32.cpp
|
| index 7a91331cd8aa95362b94b4553e8c71a5ed644a99..3d54e7017e7379f900333bc4eff826c7362b7a88 100644
|
| --- a/src/IceTargetLoweringMIPS32.cpp
|
| +++ b/src/IceTargetLoweringMIPS32.cpp
|
| @@ -2242,7 +2242,17 @@ void TargetMIPS32::lowerIntrinsicCall(const InstIntrinsicCall *Instr) {
|
| }
|
|
|
| void TargetMIPS32::lowerLoad(const InstLoad *Instr) {
|
| - UnimplementedLoweringError(this, Instr);
|
| + // A Load instruction can be treated the same as an Assign instruction, after
|
| + // the source operand is transformed into an OperandARM32Mem operand.
|
| + Type Ty = Instr->getDest()->getType();
|
| + Operand *Src0 = formMemoryOperand(Instr->getSourceAddress(), Ty);
|
| + Variable *DestLoad = Instr->getDest();
|
| + DestLoad->setMustHaveReg();
|
| +
|
| + // TODO(jvoung): handled folding opportunities. Sign and zero extension can
|
| + // be folded into a load.
|
| + auto *Assign = InstAssign::create(Func, DestLoad, Src0);
|
| + lowerAssign(Assign);
|
| }
|
|
|
| void TargetMIPS32::doAddressOptLoad() { UnimplementedError(getFlags()); }
|
|
|