[llvm] [AArch64][SME] Instcombine `llvm.aarch64.sme.in.streaming.mode()` (PR #147930)

Benjamin Maxwell via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 12 00:22:01 PDT 2025


================
@@ -2723,6 +2723,16 @@ static std::optional<Instruction *> instCombineSVEUxt(InstCombiner &IC,
   return std::nullopt;
 }
 
+static std::optional<Instruction *>
+instCombineInStreamingMode(InstCombiner &IC, IntrinsicInst &II) {
+  SMEAttrs FnSMEAttrs(*II.getFunction());
+  if (FnSMEAttrs.hasStreamingCompatibleInterface())
+    return std::nullopt;
+  bool IsStreaming = FnSMEAttrs.hasStreamingInterfaceOrBody();
+  return IC.replaceInstUsesWith(
+      II, ConstantInt::getBool(II.getType(), IsStreaming));
----------------
MacDue wrote:

```suggestion
  bool IsStreaming = FnSMEAttrs.hasStreamingInterfaceOrBody();
  if (IsStreaming || !FnSMEAttrs.hasStreamingCompatibleInterface())
    return IC.replaceInstUsesWith(
        II, ConstantInt::getBool(II.getType(), IsStreaming));
  return std::nullopt;
```

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


More information about the llvm-commits mailing list