[PATCH] D137913: [X86] Rewrite `getScalarizationOverhead()`
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 14 06:38:32 PST 2022
lebedev.ri added inline comments.
================
Comment at: llvm/lib/Target/X86/X86TargetTransformInfo.cpp:4442
- // For vXf32 cases, insertion into the 0'th index in each v4f32
- // 128-bit vector is free.
- // NOTE: This assumes legalization widens vXf32 vectors.
- if (MScalarTy == MVT::f32)
- for (unsigned i = 0, e = cast<FixedVectorType>(Ty)->getNumElements();
- i < e; i += 4)
- if (DemandedElts[i])
- Cost--;
+ APInt WidenedDemandedElts = DemandedElts.zext(NumLegalElts);
+ auto *LaneTy =
----------------
I'm a bit worried about legalization-induced padding,
that we obviously don't demand yet don't care about,
but i will look into that afterwards.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137913/new/
https://reviews.llvm.org/D137913
More information about the llvm-commits
mailing list