Debian Codegraph @

gcc/testsuite/gcc.target/arm/lob2.c

raw
1 /* Check that GCC does not generate Armv8.1-M low over head loop instructions
2 if a non-inlineable function call takes place inside the loop. */
3 /* { dg-do compile } */
4 /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" "-mcpu=*" } } */
5 /* { dg-options "-march=armv8.1-m.main+fp -mthumb -O3 --save-temps" } */
6 #include <stdlib.h>
7 #include "lob.h"
8
9 int a[N];
10 int b[N];
11 int c[N];
12
13 int __attribute__ ((noinline))
14 foo (int a, int b)
15 {
16 return a + b;
17 }
18
19 int
20 main (void)
21 {
22 for (int i = 0; i < N; i++)
23 {
24 a[i] = i;
25 b[i] = i * 2;
26 c[i] = foo (a[i], b[i]);
27 }
28
29 return 0;
30 }
31 /* { dg-final { scan-assembler-not {dls\s\S*,\s\S*} } } */
32 /* { dg-final { scan-assembler-not {le\slr,\s\S*} } } */