[PATCH] D106655: [BasicTTI] Set scalarization cost of scalable vector casts to Invalid.

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 23 06:57:57 PDT 2021


sdesmalen added inline comments.


================
Comment at: llvm/test/Analysis/CostModel/AArch64/sve-fptoi.ll:20
+; CHECK-NEXT: Cost Model: Invalid cost for instruction: %nv1f32_to_ui64 = fptoui <vscale x 1 x float> undef to <vscale x 1 x i64>
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction:   %nv1f64_to_si8 = fptosi <vscale x 1 x double> undef to <vscale x 1 x i8>
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction:   %nv1f64_to_ui8 = fptoui <vscale x 1 x double> undef to <vscale x 1 x i8>
----------------
david-arm wrote:
> It seems a little inconsistent that we return a cost of one for converting <vscale x 1 x double>, whereas it's invalid for <vscale x 1 x float>. Not sure if we need to worry about this?
Yes, it's inconsistent, but I don't think it's really something to worry about now. For all legal types or too-wide types (that require splitting) we should have sensible costs, whereas VFs with `vscale x 1` types are currently avoided for SVE.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106655



More information about the llvm-commits mailing list