[llvm] [AArch64][GISel] Support SVE with 128-bit min-size for G_LOAD and G_STORE (PR #92130)
via llvm-commits
llvm-commits at lists.llvm.org
Fri May 24 09:14:28 PDT 2024
================
@@ -2906,9 +2927,18 @@ bool AArch64InstructionSelector::select(MachineInstr &I) {
const LLT ValTy = MRI.getType(ValReg);
const RegisterBank &RB = *RBI.getRegBank(ValReg, MRI, TRI);
+ if (ValTy.isScalableVector()) {
+ assert(STI.hasSVE()
+ && "Load/Store register operand is scalable vector "
+ "while SVE is not supported by the target");
+ }
+
// The code below doesn't support truncating stores, so we need to split it
// again.
- if (isa<GStore>(LdSt) && ValTy.getSizeInBits() > MemSizeInBits) {
+ // Truncate only if type is not scalable vector
+ const bool NeedTrunc = !ValTy.isScalableVector()
+ && ValTy.getSizeInBits().getFixedValue() > MemSizeInBits;
----------------
Him188 wrote:
> Please format the entire patch.
All formatting done
https://github.com/llvm/llvm-project/pull/92130
More information about the llvm-commits
mailing list