summaryrefslogtreecommitdiff
path: root/0154-Backport-SME-recog-Support-space-in-cons.patch
blob: f11eb41b567d7c45e2ecf44c61b2bf8aa313d6df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
From e593ad216bd1f4f75d9875898f352e0e5f978159 Mon Sep 17 00:00:00 2001
From: Andrea Corallo <andrea.corallo@arm.com>
Date: Fri, 15 Sep 2023 10:23:02 +0200
Subject: [PATCH 055/157] [Backport][SME] recog: Support space in "[ cons"

Reference: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=9d31045b21324166c3997d603961d99e3c4c357d

Hi all,

this is to allow for spaces before "cons:" in the definitions of
patterns using the new compact syntax, ex:

(define_insn "aarch64_simd_dup<mode>"
  [(set (match_operand:VDQ_I 0 "register_operand")
        (vec_duplicate:VDQ_I
          (match_operand:<VEL> 1 "register_operand")))]
  "TARGET_SIMD"
  {@ [ cons: =0 , 1  ; attrs: type      ]
     [ w        , w  ; neon_dup<q>      ] dup\t%0.<Vtype>, %1.<Vetype>[0]
     [ w        , ?r ; neon_from_gp<q>  ] dup\t%0.<Vtype>, %<vwcore>1
  }
)

gcc/Changelog

2023-09-20  Andrea Corallo  <andrea.corallo@arm.com>

	* gensupport.cc (convert_syntax): Skip spaces before "cons:"
	in new compact pattern syntax.
---
 gcc/gensupport.cc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gcc/gensupport.cc b/gcc/gensupport.cc
index 97c614850..3d7a6d4fd 100644
--- a/gcc/gensupport.cc
+++ b/gcc/gensupport.cc
@@ -893,6 +893,8 @@ convert_syntax (rtx x, file_location loc)
   if (!expect_char (&templ, '['))
     fatal_at (loc, "expecing `[' to begin section list");
 
+  skip_spaces (&templ);
+
   parse_section_layout (loc, &templ, "cons:", tconvec, true);
 
   if (*templ != ']')
-- 
2.33.0