[llvm] [AArch64][CostModel] Lower cost of dupq (SVE2.1) (PR #144918)
Sander de Smalen via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 24 03:46:51 PDT 2025
================
@@ -29981,7 +29981,8 @@ SDValue AArch64TargetLowering::LowerFixedLengthVECTOR_SHUFFLEToSVE(
DAG, VT, DAG.getNode(Opc, DL, ContainerVT, Op1, Op1));
}
- if (Subtarget->hasSVE2p1() || Subtarget->hasSME2p1()) {
+ if (Subtarget->hasSVE2p1() ||
+ (Subtarget->hasSME2p1() && Subtarget->isSVEorStreamingSVEAvailable())) {
----------------
sdesmalen-arm wrote:
After having revisited this once more, the correct interpretation of:
```
if !Feature_SVE2p1 && !Feature_SME2p1 then Instruction = UNDEFINED
CheckSVEEnabled()
// can be in streaming mode
// can be in non-streaming mode
```
Is that:
* `+sve,+sme2p1` enables DUPQ in both streaming and non-streaming mode
* `+sve2p1,+sme` enables DUPQ in both streaming and non-streaming mode
Meaning that for DUPQ this expression should be:
```
if (Subtarget->hasSVE2p1() || Subtarget->hasSME2p1()) &&
Subtarget->isSVEorStreamingSVEAvailable())
```
We previously worked under the assumption that +sme* features would add features in streaming mode, and +sve* features would add features in non-streaming mode. But this is not (or no longer) the case. There may be other places where this needs fixing as well.
https://github.com/llvm/llvm-project/pull/144918
More information about the llvm-commits
mailing list