[1/2] aarch64: Allow zero to be moved into an SVE predicate tuple [PR121105]

Message ID 20261002195044.3166661-2-gcc@gcc.dp11.uk
State New
Headers
Series Zero empty constructors of SVE and RVV tuple types [PR121105] |

Commit Message

DominicP Oct. 2, 2026, 7:50 p.m. UTC
  The VNx32BI and VNx64BI move pattern accepts a constant operand but has
no alternative for one, so LRA cannot reload a zero predicate tuple.
The next patch makes expand zero an empty svboolx2_t/svboolx4_t
constructor with such a move.  Add a Dz alternative; the existing split
then emits one pfalse per predicate.

Bootstrapped and regression tested on x86_64-pc-linux-gnu.  On
aarch64-linux-gnu (qemu), regression tested dg.exp, aarch64.exp and
the SVE tests at SVE VL128, and the SVE tests at VL2048.  Tested
together with the next patch and the PR123370 patch.

Assisted-by: Claude Opus 5 (Anthropic)

	PR middle-end/121105

gcc/ChangeLog:

	* config/aarch64/aarch64-sve.md (mov<mode>) <SVE_STRUCT_BI>: Add a
	Dz alternative.

Signed-off-by: Dominic P <gcc@gcc.dp11.uk>
---
 gcc/config/aarch64/aarch64-sve.md | 1 +
 1 file changed, 1 insertion(+)
  

Patch

diff --git a/gcc/config/aarch64/aarch64-sve.md b/gcc/config/aarch64/aarch64-sve.md
index dc92cef4d88..661f978d1e8 100644
--- a/gcc/config/aarch64/aarch64-sve.md
+++ b/gcc/config/aarch64/aarch64-sve.md
@@ -1110,6 +1110,7 @@ 
      [ Upa      , Upa ] #
      [ Upa      , m   ] #
      [ m        , Upa ] #
+     [ Upa      , Dz  ] #
   }
   "&& reload_completed"
   [(const_int 0)]