public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* RFA: Fix match_scratch bug in define_subst
@ 2021-05-16 13:11 Joern Rennecke
  2021-05-27 12:05 ` Richard Sandiford
  0 siblings, 1 reply; 2+ messages in thread
From: Joern Rennecke @ 2021-05-16 13:11 UTC (permalink / raw)
  To: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 37 bytes --]

Bootstrapped on x86_64-pc-linux-gnu.

[-- Attachment #2: define-subst-patch.txt --]
[-- Type: text/plain, Size: 627 bytes --]

2020-12-10  Joern Rennecke  <joern.rennecke@embecosm.com>

    Fix bug in the define_subst handling that made match_scratch unusable for
    multi-alternative patterns.

diff --git a/gcc/gensupport.c b/gcc/gensupport.c
index e1ca06dbc1e..4022c661adb 100644
--- a/gcc/gensupport.c
+++ b/gcc/gensupport.c
@@ -1291,6 +1291,9 @@ alter_constraints (rtx pattern, int n_dup, constraints_handler_t alter)
     case MATCH_OPERAND:
       XSTR (pattern, 2) = alter (XSTR (pattern, 2), n_dup);
       break;
+    case MATCH_SCRATCH:
+      XSTR (pattern, 1) = alter (XSTR (pattern, 1), n_dup);
+      break;
 
     default:
       break;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: RFA: Fix match_scratch bug in define_subst
  2021-05-16 13:11 RFA: Fix match_scratch bug in define_subst Joern Rennecke
@ 2021-05-27 12:05 ` Richard Sandiford
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Sandiford @ 2021-05-27 12:05 UTC (permalink / raw)
  To: Joern Rennecke; +Cc: GCC Patches

Joern Rennecke <joern.rennecke@embecosm.com> writes:
> Bootstrapped on x86_64-pc-linux-gnu.
>
> 2020-12-10  Joern Rennecke  <joern.rennecke@embecosm.com>
>
>     Fix bug in the define_subst handling that made match_scratch unusable for
>     multi-alternative patterns.

OK, and sorry for the slow response.

The changelog won't pass, but I'll leave you to negotiate that with the
commit hook. :-)

Thanks,
Richard

>
> diff --git a/gcc/gensupport.c b/gcc/gensupport.c
> index e1ca06dbc1e..4022c661adb 100644
> --- a/gcc/gensupport.c
> +++ b/gcc/gensupport.c
> @@ -1291,6 +1291,9 @@ alter_constraints (rtx pattern, int n_dup, constraints_handler_t alter)
>      case MATCH_OPERAND:
>        XSTR (pattern, 2) = alter (XSTR (pattern, 2), n_dup);
>        break;
> +    case MATCH_SCRATCH:
> +      XSTR (pattern, 1) = alter (XSTR (pattern, 1), n_dup);
> +      break;
>  
>      default:
>        break;

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-27 12:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-16 13:11 RFA: Fix match_scratch bug in define_subst Joern Rennecke
2021-05-27 12:05 ` Richard Sandiford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).