[PATCH] D132216: [CostModel][X86] RFC - Support cost kind specific look up tables

Phoebe Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 20 05:18:52 PDT 2022


pengfei added inline comments.


================
Comment at: llvm/lib/Target/X86/X86TargetTransformInfo.cpp:2727
     // slm pblendvb/blendvpd/blendvps throughput is 4
-    { ISD::SELECT,  MVT::v2f64,   4 }, // vblendvpd
-    { ISD::SELECT,  MVT::v4f32,   4 }, // vblendvps
-    { ISD::SELECT,  MVT::v2i64,   4 }, // pblendvb
-    { ISD::SELECT,  MVT::v8i32,   4 }, // pblendvb
-    { ISD::SELECT,  MVT::v8i16,   4 }, // pblendvb
-    { ISD::SELECT,  MVT::v16i8,   4 }, // pblendvb
+    { ISD::SELECT,  MVT::v2f64,   { 4, 4, 1, 3 } }, // vblendvpd
+    { ISD::SELECT,  MVT::v4f32,   { 4, 4, 1, 3 } }, // vblendvps
----------------
RKSimon wrote:
> pengfei wrote:
> > RKSimon wrote:
> > > pengfei wrote:
> > > > Do we have a place to introduce the meaning of each elements, where they are used and how to get the correct value?
> > > > Besides, the previous comments are just for throughput? How can we explain the other values?
> > > I'll tweak the description at the top of the file
> > The description looks great. But I still don't understand the difference between SETCC and SELECT. Why are other cost kinds zero for SETCC?
> They aren't - they should be set to the "invalid" ~0U value by the CostKindCosts constructor (assuming I've gotten the c++ initialization orders right in my brain...).
> 
> I can make that explicit if you prefer: `CostKindCosts(4,4,1,3)`, but I was trying to avoid making it too busy, or I can add default initialization values to the CostKindCosts members?
Oh, yes. Sorry I mistook for arrays... It's clear to me now :)






Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D132216



More information about the llvm-commits mailing list