[llvm] [AArch64][CostModel] Updated inserelement/extractelement costs (PR #220627)

Jack Styles via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 8 01:27:11 PDT 2026


================

----------------
Stylie777 wrote:

This change is unnecessary. It will mean going forward the script only runs on that function.

If the new RUN line produces the same costs for other functions, then you can change it to use `--check-prefixes`. It then uses `CHECK` where there are multiple that match, and the specific check prefix where it is different. 

Something like this would work.
```
; RUN: opt -passes="print<cost-model>" -cost-kind=all 2>&1 -disable-output -S < %s | FileCheck --check-prefixes=CHECK,CHECK-DEFAULT %s
; RUN: opt -aarch64-insert-extract-base-cost=0 -passes="print<cost-model>" -cost-kind=all 2>&1 -disable-output -S < %s | FileCheck --check-prefixes=CHECK,CHECK-LOW %s
; RUN: opt -aarch64-insert-extract-base-cost=100000 -passes="print<cost-model>" -cost-kind=all 2>&1 -disable-output -S < %s | FileCheck --check-prefixes=CHECK,CHECK-HIGH %s
; RUN: opt -passes="print<cost-model>" -cost-kind=all 2>&1 -disable-output -aarch64-sve-vls-bfloat-support -S < %s | FileCheck --check-prefixes=CHECK,CHECK-VLS %s
```

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


More information about the llvm-commits mailing list