2018-03-08 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / mips / ds-schedule-1.c
blob9cc5daa831c7c448fb4c6f4f87482b7c7abd0507
1 /* { dg-options "isa_rev>=6 -mcompact-branches=optimal -mno-abicalls -G4" } */
2 /* { dg-final { scan-assembler-not "bne\t" } } */
3 /* { dg-final { scan-assembler-not "beq\t" } } */
4 /* { dg-final { scan-assembler-times "\\(foo\\)" 1 } } */
6 /* Test that when compact branches are used, that a compact branch is
7 produced in the case where code expansion would have occurred if a
8 delay slot branch would have be used. 'foo' should only be
9 referenced once in the program text. */
11 struct list
13 struct list *next;
14 int element;
17 struct list *gr;
19 int foo;
21 extern void t (int, int, int*);
23 void
24 f (struct list **ptr)
26 if (gr)
27 *ptr = gr->next;
28 t (1, foo, &gr->element);