[PATCH] D148123: [AArch64][CostModel] Make sext/zext free if folded into a masked load
Sander de Smalen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 12 06:49:24 PDT 2023
sdesmalen added inline comments.
================
Comment at: llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:1830
+ if ((ISD == ISD::ZERO_EXTEND || ISD == ISD::SIGN_EXTEND) &&
+ (CCH == TTI::CastContextHint::Masked) && ST->hasSVE()) {
+ unsigned LType =
----------------
nit: this can be `hasSVEorSME`
================
Comment at: llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:1833-1834
+ ((Opcode == Instruction::ZExt) ? ISD::ZEXTLOAD : ISD::SEXTLOAD);
+ if (TLI->isLoadExtLegal(LType, DstTy, SrcTy))
+ return 0;
+ }
----------------
When the target has SVE and the CCH is masked, is it worth just calling `getCastInstrCost` again but instead passing `CastContextHint::Normal` ?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148123/new/
https://reviews.llvm.org/D148123
More information about the llvm-commits
mailing list