[PATCH] D142456: [AArch64][CostModel]: Add costs for zero/sign extend.

hassnaaHamdi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 26 05:09:09 PST 2023


hassnaa-arm added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:2066
+    // where each operation has a cost of 1.
+    { ISD::ZERO_EXTEND, MVT::nxv16i16, MVT::nxv16i8, 3},
+    { ISD::ZERO_EXTEND, MVT::nxv16i32, MVT::nxv16i8, 6},
----------------
david-arm wrote:
> I think perhaps this can just be a cost of 2 because there are only 2 unpacks needed? Same for the SIGN_EXTEND case.
Needed instructions are 2 unpacks and 1 mov, that's why I made it 3.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142456



More information about the llvm-commits mailing list