unsigned Opcode = 0;
int Offs = cast<ConstantSDNode>(LD->getOffset())->getSExtValue();
- switch (VT.SimpleTy) {
- case MVT::i8:
- if (Offs == 1)
- Opcode = Bank > 0 ? AVR::ELPMBRdZPi : AVR::LPMRdZPi;
- break;
- case MVT::i16:
- if (Offs == 2)
- Opcode = Bank > 0 ? AVR::ELPMWRdZPi : AVR::LPMWRdZPi;
- break;
- default:
- break;
- }
+ if (VT.SimpleTy == MVT::i8 && Offs == 1 && Bank == 0)
+ Opcode = AVR::LPMRdZPi;
+
+ // TODO: Implements the expansion of the following pseudo instructions.
+ // LPMWRdZPi: type == MVT::i16, offset == 2, Bank == 0.
+ // ELPMBRdZPi: type == MVT::i8, offset == 1, Bank > 0.
+ // ELPMWRdZPi: type == MVT::i16, offset == 2, Bank > 0.
return Opcode;
}