[llvm] [AArch64][CostModel] Lower cost of dupq (SVE2.1) (PR #144918)

Sander de Smalen via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 20 09:01:49 PDT 2025


================
@@ -30005,8 +29981,14 @@ SDValue AArch64TargetLowering::LowerFixedLengthVECTOR_SHUFFLEToSVE(
           DAG, VT, DAG.getNode(Opc, DL, ContainerVT, Op1, Op1));
     }
 
-    if (Subtarget->hasSVE2p1()) {
-      if (std::optional<unsigned> Lane = isDUPQMask(ShuffleMask, VT)) {
+    if (Subtarget->hasSVE2p1() || Subtarget->hasSME2p1()) {
----------------
sdesmalen-arm wrote:

Does this require an extra RUN line for the original test?

Also, for it to be able to use laneq with SME2p1, it must be in streaming mode, so you'll need to add a check for `isSVEorStreamingSVEAvailable`

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


More information about the llvm-commits mailing list