================ @@ -116,6 +193,50 @@ void RegBankLegalizeHelper::lower(MachineInstr &MI, MI.eraseFromParent(); break; } + case SplitLoad: { + LLT DstTy = MRI.getType(MI.getOperand(0).getReg()); + unsigned Size = DstTy.getSizeInBits(); + // Even split to 128-bit loads + if (Size > 128) { + LLT B128; + if (DstTy.isVector()) { + LLT EltTy = DstTy.getElementType(); + B128 = LLT::fixed_vector(128 / EltTy.getSizeInBits(), EltTy); + } else { + B128 = LLT::scalar(128); + } + if (Size / 128 == 2) + splitLoad(MI, {B128, B128}); + if (Size / 128 == 4) + splitLoad(MI, {B128, B128, B128, B128}); ---------------- nhaehnle wrote:
I would expect this to be an else-if chain with an `else llvm_unreachable` at the end. https://github.com/llvm/llvm-project/pull/112882 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits