[PATCH] D148036: [SLP]Improve reduction cost model for scalars.
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 12 06:40:25 PDT 2023
RKSimon added inline comments.
================
Comment at: llvm/test/Transforms/SLPVectorizer/X86/horizontal-smax.ll:91
+; FIXME: looks like the cost of @llvm.smax.i32 is not correct, lowered as select+cmp
define i32 @smax_v16i32(i32) {
----------------
ABataev wrote:
> RKSimon wrote:
> > CMP+CMOV is quick even on ancient x86 - the smax.i32 throughput cost of 1 is realistic.
> >
> > The issue is the predicted smax.v16i32 reduction cost, which is currently 33 (based on expansion of costs in getMinMaxReductionCost), but realistically is closer to 12 cycles (based off some quick llvm-mca tests)
> Can you fix it?
I'll try to fix some of the obvious issues to unstick this patch, but a more complete fix will take more time.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148036/new/
https://reviews.llvm.org/D148036
More information about the llvm-commits
mailing list