]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix gcc.target/aarch64/movk.c testcase after IPA-VRP improvement for return values
authorAndrew Pinski <quic_apinski@quicinc.com>
Wed, 22 Nov 2023 02:25:24 +0000 (18:25 -0800)
committerAndrew Pinski <quic_apinski@quicinc.com>
Sat, 25 Nov 2023 21:34:17 +0000 (13:34 -0800)
The problem here is dummy_number_generator returns a constant which IPA VRP is now able
propagate that so we need to mark the funciton as noipa to stop that.

gcc/testsuite/ChangeLog:

PR testsuite/112688
* 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

index e6e4e3a8961e078222e92a85880645a0a0bff4e8..1fa11540c6c277aad29238dec9e6fa7074362c71 100644 (file)
@@ -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 ()
 {