[PATCH] D96253: [BasicTTIImpl] Fix getCastInstrCost for scalable vectors by querying for ElementCount.

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 9 06:53:19 PST 2021


david-arm added inline comments.


================
Comment at: llvm/test/Analysis/CostModel/AArch64/cast.ll:711
 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %loadv4i32 = load <4 x i32>, <4 x i32>* undef
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %loadnxv2i32 = load <vscale x 2 x i32>, <vscale x 2 x i32>* undef
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %loadnxv4i32 = load <vscale x 4 x i32>, <vscale x 4 x i32>* undef
----------------
Hi @sdesmalen, given you've added support in the cost function for scalable vectors of the type <vscale x 1 x ElTy> perhaps it's worth adding a test for that too? i.e.

```%loadnxv1i32 = load <vscale x 1 x i32>, <vscale x 1 x i32>* undef```



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96253



More information about the llvm-commits mailing list