[llvm] TTI: Fix special casing vectorization costs of saturating add/sub (PR #97463)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 25 03:18:46 PDT 2024


================
@@ -73,9 +73,9 @@ define i32 @add(i32 %arg) {
 ;
 ; SSE42-LABEL: 'add'
 ; SSE42-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %I64 = call i64 @llvm.sadd.sat.i64(i64 undef, i64 undef)
-; SSE42-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %V2I64 = call <2 x i64> @llvm.sadd.sat.v2i64(<2 x i64> undef, <2 x i64> undef)
----------------
RKSimon wrote:

These are CUSTOM but without cost table entries, so with this patch we'll default to 2 * cost - I'll add them to the x86 cost tables

https://github.com/llvm/llvm-project/pull/97463


More information about the llvm-commits mailing list