public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* (no subject)
@ 2021-05-16 14:25 Joern Rennecke
  2021-05-16 14:33 ` RFA: Fix match_dup numbering bug in define_cond_exec Joern Rennecke
  2021-05-27 12:11 ` none Richard Sandiford
  0 siblings, 2 replies; 3+ messages in thread
From: Joern Rennecke @ 2021-05-16 14:25 UTC (permalink / raw)
  To: GCC Patches

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

At the moment, for a match_dup in a define_cond_exec, you'd have to
give the number in the
resulting pattern(s) rather than in the substitute pattern.  That's
not only wrong, but can also
be impossible when the pattern should apply to multiple patterns with
different operand numbers.

The attached patch fixes this.

Bootstrapped on x86_64-pc-linux-gnu.

[-- Attachment #2: define_cond_exec_patch.txt --]
[-- Type: text/plain, Size: 527 bytes --]

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

	Fix match_dup bug of define_cond_exec.
	* gensupport.c (alter_predicate_for_insn): Handle MATCH_DUP.

diff --git a/gcc/gensupport.c b/gcc/gensupport.c
index e1ca06dbc1e..92275358078 100644
--- a/gcc/gensupport.c
+++ b/gcc/gensupport.c
@@ -1230,6 +1230,7 @@ alter_predicate_for_insn (rtx pattern, int alt, int max_op,
     case MATCH_OPERATOR:
     case MATCH_SCRATCH:
     case MATCH_PARALLEL:
+    case MATCH_DUP:
       XINT (pattern, 0) += max_op;
       break;
 

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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-16 14:25 Joern Rennecke
2021-05-16 14:33 ` RFA: Fix match_dup numbering bug in define_cond_exec Joern Rennecke
2021-05-27 12:11 ` none 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).