[llvm] [AArch64] Guard against non-simple types in udiv sve costs. (PR #148580)
Ricardo Jesus via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 15 01:16:59 PDT 2025
================
@@ -4126,10 +4126,10 @@ InstructionCost AArch64TTIImpl::getArithmeticInstrCost(
if (TLI->isOperationLegalOrCustom(ISD, LT.second) && ST->hasSVE()) {
// SDIV/UDIV operations are lowered using SVE, then we can have less
// costs.
- if (isa<FixedVectorType>(Ty) && cast<FixedVectorType>(Ty)
- ->getPrimitiveSizeInBits()
- .getFixedValue() < 128) {
- EVT VT = TLI->getValueType(DL, Ty);
+ if (VT.isSimple() && isa<FixedVectorType>(Ty) &&
+ cast<FixedVectorType>(Ty)
----------------
rj-jesus wrote:
You're right, I just thought we could avoid the multiline expression while at it :p Thanks very much for the fix!
https://github.com/llvm/llvm-project/pull/148580
More information about the llvm-commits
mailing list