[PATCH] D148123: [AArch64][CostModel] Make sext/zext free if folded into a masked load
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 19 09:02:51 PDT 2023
dmgreen accepted this revision.
dmgreen added a comment.
I see. I am surprised that patch could be committed without causing regressions again.
The way this patch works makes it look like extends of masked costs should be the same as normal loads, I can't say I'm a huge fan of that just because it is not really how they work. Plus you have to try to reason about what the costs will become. So long as there are tests though, that should not be a problem and we can see we are getting the right costs out. The number do now look good.
================
Comment at: llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:2151
+ if ((ISD == ISD::ZERO_EXTEND || ISD == ISD::SIGN_EXTEND) &&
+ (CCH == TTI::CastContextHint::Masked) && ST->hasSVEorSME() &&
+ TLI->isTypeLegal(DstTy))
----------------
You can drop the brackets around `CCH == TTI::CastContextHint::Masked`
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148123/new/
https://reviews.llvm.org/D148123
More information about the llvm-commits
mailing list