[PATCH] D106239: [AArch64] Expand the SVE min/max reduction costs to NEON

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 20 00:39:33 PDT 2021


david-arm added a comment.

This patch looks like a good improvement on the original costs! I just had a question about one anomaly ...



================
Comment at: llvm/test/Analysis/CostModel/AArch64/reduce-minmax.ll:190
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V8f16 = call half @llvm.vector.reduce.fmax.v8f16(<8 x half> undef)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 73 for instruction: %V16f16 = call half @llvm.vector.reduce.fmax.v16f16(<16 x half> undef)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %V2f32 = call float @llvm.vector.reduce.fmax.v2f32(<2 x float> undef)
----------------
Hi @dmgreen, something strange is going on for v16f16 here with a cost of 73. I ran llc for this intrinsic and got:

  fmaxnm  v0.8h, v0.8h, v1.8h
  fmaxnmv h0, v0.8h

so a cost of 3 inline with umax.v16i16 seems reasonable here.


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

https://reviews.llvm.org/D106239



More information about the llvm-commits mailing list