[llvm] [AArch64] [CostModel] Fix cost modelling for saturating arithmetic intrinsics (PR #152333)
Benjamin Maxwell via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 7 09:49:41 PDT 2025
================
@@ -1,5 +1,6 @@
; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
-; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mtriple=aarch64 < %s | FileCheck %s
+; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mtriple=aarch64 < %s | FileCheck %s --check-prefix=BASE
+; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=throughput -mtriple=aarch64--linux-gnu -mattr=+sve < %s | FileCheck %s --check-prefix=SVE
----------------
MacDue wrote:
The usual solution to common checks with is something like:
```suggestion
; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mtriple=aarch64 < %s | FileCheck %s --check-prefixes=COMMON,BASE
; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=throughput -mtriple=aarch64--linux-gnu -mattr=+sve < %s | FileCheck %s --check-prefixes=COMMON,SVE
```
Where both "RUN" lines produce the same output only "COMMON" checks will be emitted, and where the run lines differ you'll see "BASE" and "SVE" checks.
https://github.com/llvm/llvm-project/pull/152333
More information about the llvm-commits
mailing list