[PATCH] D56907: [TTI] Add generic USUBSAT costs

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 18 13:48:31 PST 2019


RKSimon marked an inline comment as done.
RKSimon added inline comments.


================
Comment at: test/Analysis/CostModel/X86/arith-usat.ll:313
+; AVX2-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %V2I64 = call <2 x i64> @llvm.usub.sat.v2i64(<2 x i64> undef, <2 x i64> undef)
+; AVX2-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %V4I64 = call <4 x i64> @llvm.usub.sat.v4i64(<4 x i64> undef, <4 x i64> undef)
+; AVX2-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %V8I64 = call <8 x i64> @llvm.usub.sat.v8i64(<8 x i64> undef, <8 x i64> undef)
----------------
nikic wrote:
> Not directly related to this change, but the current icmp cost model for X86 doesn't distinguish comparison types, so it assigns the same cost to signed and unsigned vector comparisons, even though the latter only exist since AVX512. The cost here should probably be 5 to account for the sign flips.
https://bugs.llvm.org/show_bug.cgi?id=40376


Repository:
  rL LLVM

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

https://reviews.llvm.org/D56907





More information about the llvm-commits mailing list