(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
mips/
ds-schedule-1.c
       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 } } */
       5  
       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.  */
      10  
      11  struct list
      12  {
      13    struct list *next;
      14    int element;
      15  };
      16  
      17  struct list *gr;
      18  
      19  int foo;
      20  
      21  extern void t (int, int, int*);
      22  
      23  void
      24  f (struct list **ptr)
      25  {
      26    if (gr)
      27      *ptr = gr->next;
      28    t (1, foo, &gr->element);
      29  }