[llvm] [AArch64][GISel] Support SVE with 128-bit min-size for G_LOAD and G_STORE (PR #92130)
Thorsten Schütt via llvm-commits
llvm-commits at lists.llvm.org
Sun May 19 23:48:43 PDT 2024
================
@@ -740,11 +741,14 @@ AArch64RegisterBankInfo::getInstrMapping(const MachineInstr &MI) const {
LLT Ty = MRI.getType(MO.getReg());
if (!Ty.isValid())
continue;
- OpSize[Idx] = Ty.getSizeInBits();
+ OpSize[Idx] = Ty.getSizeInBits().getKnownMinValue();
- // As a top-level guess, vectors go in FPRs, scalars and pointers in GPRs.
+ // As a top-level guess, scalable vectors go in SVRs, non-scalable
+ // vectors go in FPRs, scalars and pointers in GPRs.
// For floating-point instructions, scalars go in FPRs.
- if (Ty.isVector() || isPreISelGenericFloatingPointOpcode(Opc) ||
+ if (Ty.isScalableVector())
+ OpRegBankIdx[Idx] = PMI_FirstFPR;
+ else if (Ty.isVector() || isPreISelGenericFloatingPointOpcode(Opc) ||
----------------
tschuett wrote:
We have to distinguish between scalable and fixed sized vectors explicitly.
```
Ty.getSizeInBits()
```
asserts for scalable vectors.
https://github.com/llvm/llvm-project/pull/92130
More information about the llvm-commits
mailing list