Debian Codegraph @

gcc/testsuite/gcc.target/sh/pr51244-11.c

raw
1 /* Check that zero-displacement branches are used instead of branch-free
2 execution patterns.
3 This is usually handled by the *cset_zero patterns. */
4 /* { dg-do compile } */
5 /* { dg-options "-O1 -mzdcbranch" } */
6 /* { dg-final { scan-assembler-not "subc|and|bra" } } */
7 /* { dg-final { scan-assembler-times "bf\t0f" 1 } } */
8 /* { dg-final { scan-assembler-times "bt\t0f" 1 } } */
9
10 int*
11 test_00 (int* s)
12 {
13 if (s[0] == 0)
14 if (!s[3])
15 s = 0;
16 return s;
17 }
18
19 int*
20 test_01 (int* s)
21 {
22 if (s[0] == 0)
23 if (s[3])
24 s = 0;
25 return s;
26 }