]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
recog: Support space in "[ cons"
authorAndrea Corallo <andrea.corallo@arm.com>
Fri, 15 Sep 2023 08:23:02 +0000 (10:23 +0200)
committerAndrea Corallo <andrea.corallo@arm.com>
Tue, 3 Oct 2023 08:39:05 +0000 (10:39 +0200)
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

index 7e125e3d8dbd28f36f6c32de915038d91c732ce0..dd920d673b4524447fcdba7e50995d083b067883 100644 (file)
@@ -894,6 +894,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 != ']')