public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] genrecog.cc (print_nonbool_test): Fix type error of SUBREG_BYTE
@ 2022-09-19  6:01 Jojo R
  2022-09-20  8:33 ` Richard Sandiford
  0 siblings, 1 reply; 2+ messages in thread
From: Jojo R @ 2022-09-19  6:01 UTC (permalink / raw)
  To: rjiejie, gcc-patches

	* gcc/genrecog.cc (print_nonbool_test): Fix type error of
	SUBREG_BYTE
---
 gcc/genrecog.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gcc/genrecog.cc b/gcc/genrecog.cc
index 77f8fb97853..319e437e334 100644
--- a/gcc/genrecog.cc
+++ b/gcc/genrecog.cc
@@ -4619,6 +4619,7 @@ print_nonbool_test (output_state *os, const rtx_test &test)
       printf ("SUBREG_BYTE (");
       print_test_rtx (os, test);
       printf (")");
+      printf (".to_constant ()");
       break;
 
     case rtx_test::WIDE_INT_FIELD:
-- 
2.24.3 (Apple Git-128)


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

* Re: [PATCH] genrecog.cc (print_nonbool_test): Fix type error of SUBREG_BYTE
  2022-09-19  6:01 [PATCH] genrecog.cc (print_nonbool_test): Fix type error of SUBREG_BYTE Jojo R
@ 2022-09-20  8:33 ` Richard Sandiford
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Sandiford @ 2022-09-20  8:33 UTC (permalink / raw)
  To: Jojo R via Gcc-patches; +Cc: rjiejie

Jojo R via Gcc-patches <gcc-patches@gcc.gnu.org> writes:
> 	* gcc/genrecog.cc (print_nonbool_test): Fix type error of
> 	SUBREG_BYTE

We can't do this here.  The code has done nothing to prove that the
subreg offset is a compile-time constant.

Thanks,
Richard

> ---
>  gcc/genrecog.cc | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/gcc/genrecog.cc b/gcc/genrecog.cc
> index 77f8fb97853..319e437e334 100644
> --- a/gcc/genrecog.cc
> +++ b/gcc/genrecog.cc
> @@ -4619,6 +4619,7 @@ print_nonbool_test (output_state *os, const rtx_test &test)
>        printf ("SUBREG_BYTE (");
>        print_test_rtx (os, test);
>        printf (")");
> +      printf (".to_constant ()");
>        break;
>  
>      case rtx_test::WIDE_INT_FIELD:

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

end of thread, other threads:[~2022-09-20  8:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-19  6:01 [PATCH] genrecog.cc (print_nonbool_test): Fix type error of SUBREG_BYTE Jojo R
2022-09-20  8:33 ` 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).