[PATCH] D155459: [AArch64] Change the cost of vector insert/extract to 2

Sjoerd Meijer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 20 05:50:09 PDT 2023


SjoerdMeijer added inline comments.


================
Comment at: llvm/test/Analysis/CostModel/AArch64/vector-select.ll:692
 ; COST-LABEL: v8f16_select_une
-; COST-NOFP16-NEXT:  Cost Model: Found an estimated cost of 29 for instruction:   %cmp.1 = fcmp une <8 x half> %a, %b
+; COST-NOFP16-NEXT:  Cost Model: Found an estimated cost of 22 for instruction:   %cmp.1 = fcmp une <8 x half> %a, %b
 ; COST-NOFP16-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %s.1 = select <8 x i1> %cmp.1, <8 x half> %a, <8 x half> %c
----------------
efriedma wrote:
> dmgreen wrote:
> > efriedma wrote:
> > > Cost modeling is weird.
> > Because it is too low? It is scalarized without +fullfp16. That codegen could be better, and it looks like the cost is a bit low, not accounting for the scalarization cost of the extracts. I don't think we have focussed much in the past on the combination of fp16 code without fullfp16.
> Wait, we scalarize this?  I thought I checked this, but must not have.  We really shouldn't scalarize, though.
Without fullfp16 support, which is what this is checking with "COST-NOFP16-NEXT", I expect this to get scalarised. 


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155459/new/

https://reviews.llvm.org/D155459



More information about the llvm-commits mailing list