(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
sh/
pr51244-9.c
       1  /* Check that compare-branch is inverted properly.
       2     Example:
       3  	mov.w	.L566,r2	->	mov.w	.L566,r2
       4  	add	r11,r2			add	r11,r2
       5  	mov.l	@(12,r2),r7		mov.l	@(8,r2),r5
       6  	mov.l	@(8,r2),r5		mov.l	@(12,r2),r2
       7  	mov	#0,r2			tst	r2,r2
       8  	cmp/hi	r2,r7			bt	.L534
       9  	bf	.L534
      10  */
      11  /* { dg-do compile }  */
      12  /* { dg-options "-O2" } */
      13  /* { dg-final { scan-assembler-not "mov\t#0" } } */
      14  static inline unsigned int
      15  test_03_00 (unsigned int x)
      16  {
      17    /* Return unassigned value on purpose.  */
      18    unsigned int res;
      19    return res;
      20  }
      21  
      22  struct S
      23  {
      24    unsigned int a;
      25    unsigned int b;
      26  };
      27  
      28  int test_03 (struct S* i)
      29  {
      30   if ((i->a != 2 && i->a != 3) || i->a > test_03_00 (i->b))
      31     return -5;
      32  
      33   return -55;
      34  }