Fix gcc.target/aarch64/movk.c testcase after IPA-VRP improvement for return values

Message ID 20231122031756.3403606-1-quic_apinski@quicinc.com
State Accepted
Headers
Series Fix gcc.target/aarch64/movk.c testcase after IPA-VRP improvement for return values |

Checks

Context Check Description
snail/gcc-patch-check success Github commit url

Commit Message

Andrew Pinski (QUIC) Nov. 22, 2023, 3:17 a.m. UTC
  This fixes the testcase.

gcc/testsuite/ChangeLog:

	* gcc.target/aarch64/movk.c: Add noipa on dummy_number_generator
	and remove -fno-inline option.

Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
---
 gcc/testsuite/gcc.target/aarch64/movk.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
  

Comments

Richard Sandiford Nov. 25, 2023, 10:14 a.m. UTC | #1
Andrew Pinski <quic_apinski@quicinc.com> writes:
> This fixes the testcase.
>
> gcc/testsuite/ChangeLog:
>
> 	* gcc.target/aarch64/movk.c: Add noipa on dummy_number_generator
> 	and remove -fno-inline option.
>
> Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>

OK, thanks.

Richard

> ---
>  gcc/testsuite/gcc.target/aarch64/movk.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/gcc/testsuite/gcc.target/aarch64/movk.c b/gcc/testsuite/gcc.target/aarch64/movk.c
> index e6e4e3a8961..1fa11540c6c 100644
> --- a/gcc/testsuite/gcc.target/aarch64/movk.c
> +++ b/gcc/testsuite/gcc.target/aarch64/movk.c
> @@ -1,8 +1,11 @@
>  /* { dg-do run } */
> -/* { dg-options "-O2 --save-temps -fno-inline" } */
> +/* { dg-options "-O2 --save-temps" } */
>  
>  extern void abort (void);
>  
> +/* Note GCC can optimize this to -346565474575675 even without inlining so
> +   mark it for noipa.  */
> +[[gnu::noipa]]
>  long long int
>  dummy_number_generator ()
>  {
  

Patch

diff --git a/gcc/testsuite/gcc.target/aarch64/movk.c b/gcc/testsuite/gcc.target/aarch64/movk.c
index e6e4e3a8961..1fa11540c6c 100644
--- a/gcc/testsuite/gcc.target/aarch64/movk.c
+++ b/gcc/testsuite/gcc.target/aarch64/movk.c
@@ -1,8 +1,11 @@ 
 /* { dg-do run } */
-/* { dg-options "-O2 --save-temps -fno-inline" } */
+/* { dg-options "-O2 --save-temps" } */
 
 extern void abort (void);
 
+/* Note GCC can optimize this to -346565474575675 even without inlining so
+   mark it for noipa.  */
+[[gnu::noipa]]
 long long int
 dummy_number_generator ()
 {