[PATCH] D48172: [CostModel][AArch64] Add some initial costs for SK_Select and SK_PermuteSingleSrc

Evandro Menezes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 14 12:28:04 PDT 2018


evandro added inline comments.


================
Comment at: lib/Target/AArch64/AArch64TargetTransformInfo.cpp:963
+  if (Kind == TTI::SK_Select) {
+    static const CostTblEntry SelectTbl[] = {
+        {ISD::VECTOR_SHUFFLE, MVT::v2i32, 1},
----------------
RKSimon wrote:
> evandro wrote:
> > I'm not sure that the costs of 64 and 128 bits long vectors should be different.
> I'm going off the codegen in the shuffle-select.ll tests below where 2X32 selects are a move and 4X32 selects are a rev+trn.
> 
> If you have better cost estimates please suggest them - I don't know much about the aarch64 microarch and I'm really just wanting to fix regressions in D48174 caused by the existing (dubious) shuffle costs.
That's an artifact due to the mask values being different for both tests.  Were they, say, `<0, 2>` in `sel.v2i32()` and `<0, 2, 4, 6>` in `sel.v4i32()`, both would result in a single instruction performing the shuffle.


Repository:
  rL LLVM

https://reviews.llvm.org/D48172





More information about the llvm-commits mailing list