]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: arm: Only check for absence of literal pools in no-literal-pool-m0.c
authorTorbjörn SVENSSON <torbjorn.svensson@foss.st.com>
Sun, 13 Oct 2024 14:23:37 +0000 (16:23 +0200)
committerTorbjörn SVENSSON <torbjorn.svensson@foss.st.com>
Wed, 20 Nov 2024 06:49:27 +0000 (07:49 +0100)
With the changes in r15-1579-g792f97b44ff, the constants have been
updated.
This patch drops the fragile check on the constants and instead only
checks that there is no literal pool generated.

gcc/testsuite/ChangeLog:

* gcc.target/arm/pure-code/no-literal-pool-m0.c: Only check for
absence of literal pools.

Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
gcc/testsuite/gcc.target/arm/pure-code/no-literal-pool-m0.c

index bd6f4af183b22fb339fb3674e9514c9eff54a2ba..4f9265eca853a50b293c74e1e438d40a39f189af 100644 (file)
 /* { dg-do compile } */
 /* { dg-skip-if "skip override" { *-*-* } { "-mfloat-abi=hard" } { "" } } */
 /* { dg-options "-mpure-code -mcpu=cortex-m0 -march=armv6s-m -mthumb -mfloat-abi=soft" } */
-/* { dg-final { check-function-bodies "**" "" } } */
 
-/* Does not use thumb1_gen_const_int.
-** test_0:
-**     ...
-**     movs    r[0-3], #0
-**     ...
-*/
+/* Does not use thumb1_gen_const_int.  */
 int
 test_0 ()
 {
   return 0;
 }
 
-/* Does not use thumb1_gen_const_int.
-** test_128:
-**     ...
-**     movs    r[0-3], #128
-**     ...
-*/
+/* Does not use thumb1_gen_const_int.  */
 int
 test_128 ()
 {
   return 128;
 }
 
-/* Does not use thumb1_gen_const_int.
-** test_264:
-**     ...
-**     movs    r[0-3], #132
-**     lsls    r[0-3], r[0-3], #1
-**     ...
-*/
+/* Does not use thumb1_gen_const_int.  */
 int
 test_264 ()
 {
   return 264;
 }
 
-/* Does not use thumb1_gen_const_int.
-** test_510:
-**     ...
-**     movs    r[0-3], #255
-**     lsls    r[0-3], r[0-3], #1
-**     ...
-*/
+/* Does not use thumb1_gen_const_int.  */
 int
 test_510 ()
 {
   return 510;
 }
 
-/* Does not use thumb1_gen_const_int.
-** test_512:
-**     ...
-**     movs    r[0-3], #128
-**     lsls    r[0-3], r[0-3], #2
-**     ...
-*/
+/* Does not use thumb1_gen_const_int.  */
 int
 test_512 ()
 {
   return 512;
 }
 
-/* Does not use thumb1_gen_const_int.
-** test_764:
-**     ...
-**     movs    r[0-3], #191
-**     lsls    r[0-3], r[0-3], #2
-**     ...
-*/
+/* Does not use thumb1_gen_const_int.  */
 int
 test_764 ()
 {
   return 764;
 }
 
-/* Does not use thumb1_gen_const_int.
-** test_65536:
-**     ...
-**     movs    r[0-3], #128
-**     lsls    r[0-3], r[0-3], #9
-**     ...
-*/
+/* Does not use thumb1_gen_const_int.  */
 int
 test_65536 ()
 {
   return 65536;
 }
 
-/*
-** test_0x123456:
-**     ...
-**     movs    r[0-3], #18
-**     lsls    r[0-3], r[0-3], #8
-**     adds    r[0-3], r[0-3], #52
-**     lsls    r[0-3], r[0-3], #8
-**     adds    r[0-3], r[0-3], #86
-**     ...
-*/
 int
 test_0x123456 ()
 {
   return 0x123456;
 }
 
-/*
-** test_0x1123456:
-**     ...
-**     movs    r[0-3], #137
-**     lsls    r[0-3], r[0-3], #8
-**     adds    r[0-3], r[0-3], #26
-**     lsls    r[0-3], r[0-3], #8
-**     adds    r[0-3], r[0-3], #43
-**     lsls    r[0-3], r[0-3], #1
-**     ...
-*/
 int
 test_0x1123456 ()
 {
   return 0x1123456;
 }
 
-/* With -Os, we generate:
-   movs r0, #16
-   lsls r0, r0, r0
-   With the other optimization levels, we generate:
-   movs r0, #16
-   lsls r0, r0, #16
-   hence the two alternatives.  */
-/*
-** test_0x1000010:
-**     ...
-**     movs    r[0-3], #16
-**     lsls    r[0-3], r[0-3], (#16|r[0-3])
-**     adds    r[0-3], r[0-3], #1
-**     lsls    r[0-3], r[0-3], #4
-**     ...
-*/
 int
 test_0x1000010 ()
 {
   return 0x1000010;
 }
 
-/*
-** test_0x1000011:
-**     ...
-**     movs    r[0-3], #1
-**     lsls    r[0-3], r[0-3], #24
-**     adds    r[0-3], r[0-3], #17
-**     ...
-*/
 int
 test_0x1000011 ()
 {
   return 0x1000011;
 }
 
-/*
-** test_m8192:
-**     ...
-**     movs    r[0-3], #1
-**     lsls    r[0-3], r[0-3], #13
-**     rsbs    r[0-3], r[0-3], #0
-**     ...
-*/
 int
 test_m8192 ()
 {
   return -8192;
 }
+
+/* { dg-final { scan-assembler-not "\tldr\tr\[0-9\]+, \\.L\[0-9\]+" } } */