diff mbox series

[v3,6/7] scev-cast.c: Adjusted

Message ID 20241110125550.787007-7-hjl.tools@gmail.com
State New
Headers show
Series Improve outgoing integer argument promotion | expand

Commit Message

H.J. Lu Nov. 10, 2024, 12:55 p.m. UTC
Since the C frontend no longer promotes char argument, adjust scev-cast.c.

	PR middle-end/14907
	* gcc.dg/tree-ssa/scev-cast.c: Adjusted.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
---
 gcc/testsuite/gcc.dg/tree-ssa/scev-cast.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Richard Biener Nov. 20, 2024, 2:24 p.m. UTC | #1
On Sun, Nov 10, 2024 at 1:56 PM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> Since the C frontend no longer promotes char argument, adjust scev-cast.c.

I wonder whether the adjusted testcase would pass now already for
!PROMOTE_PROTOTYPE
targets and thus whether the { target i?86-*-* x86_64-*-* } is still
necessary after the change?

>         PR middle-end/14907
>         * gcc.dg/tree-ssa/scev-cast.c: Adjusted.
>
> Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
> ---
>  gcc/testsuite/gcc.dg/tree-ssa/scev-cast.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/gcc/testsuite/gcc.dg/tree-ssa/scev-cast.c b/gcc/testsuite/gcc.dg/tree-ssa/scev-cast.c
> index c569523ffa7..1a3c150a884 100644
> --- a/gcc/testsuite/gcc.dg/tree-ssa/scev-cast.c
> +++ b/gcc/testsuite/gcc.dg/tree-ssa/scev-cast.c
> @@ -22,6 +22,6 @@ void tst(void)
>      blau ((unsigned char) i);
>  }
>
> -/* { dg-final { scan-tree-dump-times "& 255" 1 "optimized" } } */
> -/* { dg-final { scan-tree-dump-times "= \\(signed char\\)" 1 "optimized" } } */
> +/* { dg-final { scan-tree-dump-times "= \\(unsigned char\\)" 2 "optimized" } } */
> +/* { dg-final { scan-tree-dump-times "= \\(signed char\\)" 3 "optimized" } } */
>
> --
> 2.47.0
>
H.J. Lu Nov. 20, 2024, 10:30 p.m. UTC | #2
On Wed, Nov 20, 2024 at 10:24 PM Richard Biener <richard.guenther@gmail.com>
wrote:

> On Sun, Nov 10, 2024 at 1:56 PM H.J. Lu <hjl.tools@gmail.com> wrote:
> >
> > Since the C frontend no longer promotes char argument, adjust
> scev-cast.c.
>
> I wonder whether the adjusted testcase would pass now already for
> !PROMOTE_PROTOTYPE
> targets and thus whether the { target i?86-*-* x86_64-*-* } is still
> necessary after the change?
>

I will check.


> >         PR middle-end/14907
> >         * gcc.dg/tree-ssa/scev-cast.c: Adjusted.
> >
> > Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
> > ---
> >  gcc/testsuite/gcc.dg/tree-ssa/scev-cast.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/gcc/testsuite/gcc.dg/tree-ssa/scev-cast.c
> b/gcc/testsuite/gcc.dg/tree-ssa/scev-cast.c
> > index c569523ffa7..1a3c150a884 100644
> > --- a/gcc/testsuite/gcc.dg/tree-ssa/scev-cast.c
> > +++ b/gcc/testsuite/gcc.dg/tree-ssa/scev-cast.c
> > @@ -22,6 +22,6 @@ void tst(void)
> >      blau ((unsigned char) i);
> >  }
> >
> > -/* { dg-final { scan-tree-dump-times "& 255" 1 "optimized" } } */
> > -/* { dg-final { scan-tree-dump-times "= \\(signed char\\)" 1
> "optimized" } } */
> > +/* { dg-final { scan-tree-dump-times "= \\(unsigned char\\)" 2
> "optimized" } } */
> > +/* { dg-final { scan-tree-dump-times "= \\(signed char\\)" 3
> "optimized" } } */
> >
> > --
> > 2.47.0
> >
>
diff mbox series

Patch

diff --git a/gcc/testsuite/gcc.dg/tree-ssa/scev-cast.c b/gcc/testsuite/gcc.dg/tree-ssa/scev-cast.c
index c569523ffa7..1a3c150a884 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/scev-cast.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/scev-cast.c
@@ -22,6 +22,6 @@  void tst(void)
     blau ((unsigned char) i);
 }
 
-/* { dg-final { scan-tree-dump-times "& 255" 1 "optimized" } } */
-/* { dg-final { scan-tree-dump-times "= \\(signed char\\)" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "= \\(unsigned char\\)" 2 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "= \\(signed char\\)" 3 "optimized" } } */