The patch implements microMIPSr6 LH, LHE, LHU and LHUE instructions.
There was a problem with previous implementation of this instructions (D9824) and because of that commit rL254897 was reverted.
After commit of previous patch, test-suite failed with error message in the form of:
fatal error: error in backend: Cannot select: t124: i32,ch = load<LD2[%d](tbaa=<0x94acc48>), sext from i16> t0, t2, undef:i32
There was problem with selecting lh and lhu instructions in LLVM backend.
For that reason I decided to revert commit rL254897 and make this patch which besides implementation of instructions and standard regression tests also includes CodeGen tests (lh_lhu.ll).
Can you redo this definition in the style of SB32_SH32_STORE_FM_MMR6 ? You split addr into base and offset, then assign to Inst.