]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
aarch64: Implement 16-byte vector mode const0 store by TImode
authorHaochen Gui <guihaoc@gcc.gnu.org>
Mon, 19 Aug 2024 02:35:47 +0000 (10:35 +0800)
committerHaochen Gui <guihaoc@gcc.gnu.org>
Mon, 19 Aug 2024 02:40:43 +0000 (10:40 +0800)
gcc/
* config/aarch64/aarch64-simd.md (mov<mode> for VSTRUCT_QD):
Expand 16-byte vector mode const0 store by TImode.

gcc/config/aarch64/aarch64-simd.md

index 475f19766c38e38bff7ea683c98165629e9f02c5..23c03a96371858d48a05aaca7673d1920b9d20b6 100644 (file)
        (match_operand:VSTRUCT_QD 1 "general_operand"))]
   "TARGET_FLOAT"
 {
-  if (can_create_pseudo_p ())
+  if (known_eq (GET_MODE_SIZE (<MODE>mode), 16)
+      && operands[1] == CONST0_RTX (<MODE>mode)
+      && MEM_P (operands[0])
+      && (can_create_pseudo_p ()
+         || memory_address_p (TImode, XEXP (operands[0], 0))))
+    {
+      operands[0] = adjust_address (operands[0], TImode, 0);
+      operands[1] = CONST0_RTX (TImode);
+    }
+  else if (can_create_pseudo_p ())
     {
       if (GET_CODE (operands[0]) != REG)
        operands[1] = force_reg (<MODE>mode, operands[1]);