[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 07:38:54 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) {
----------------
RKSimon wrote:
> 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.
Please can you rebase after rG63c3895327839ba5b57f5b99ec9e888abf976ac6 ?


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