[llvm] [AArch64] Fix using NEON copies in streaming-mode-enable regions. (PR #174738)

Amara Emerson via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 7 10:14:28 PST 2026


================
@@ -5674,8 +5699,11 @@ void AArch64InstrInfo::copyPhysReg(MachineBasicBlock &MBB,
 
   if (AArch64::FPR128RegClass.contains(DestReg) &&
       AArch64::FPR128RegClass.contains(SrcReg)) {
-    if (Subtarget.isSVEorStreamingSVEAvailable() &&
-        !Subtarget.isNeonAvailable()) {
+    // In streaming regions, NEON is illegal but streaming-SVE is available.
+    // Use SVE for copies if we're in a streaming region and SME is available.
+    if ((Subtarget.isSVEorStreamingSVEAvailable() &&
+         !Subtarget.isNeonAvailable()) ||
+        isInStreamingCallSiteRegion(MBB, I)) {
----------------
aemerson wrote:

I can add the `SMEFA64` part but `Subtarget.isSVEorStreamingSVEAvailable() && ` isn't correct for Apple cores, since we don't implement SVE, in these call sites in normal functions `Subtarget.isSVEorStreamingSVEAvailable()` will return false.

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


More information about the llvm-commits mailing list