(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
vax/
peephole2-eq-andsi.c
       1  /* { dg-do compile } */
       2  /* { dg-options "-fdump-rtl-peephole2 -dp" } */
       3  /* { dg-skip-if "code quality test" { *-*-* } { "-O0" "-O1" } { "" } } */
       4  
       5  typedef int __attribute__ ((mode (SI))) int_t;
       6  
       7  int_t
       8  eq_andsi (int_t x, int_t y)
       9  {
      10    x &= y;
      11    if (x == 0)
      12      return 1;
      13    else
      14      return 2;
      15  }
      16  
      17  /* Expect assembly like:
      18  
      19  	bitl 4(%ap),8(%ap)		# 52	[c=34]  *bitsi_ccz
      20  	jneq .L6			# 41	[c=26]  *branch_ccz
      21  	movl $1,%r0			# 36	[c=4]  *movsi_2
      22  	ret				# 47	[c=0]  return
      23  .L6:
      24  
      25   */
      26  
      27  /* { dg-final { scan-rtl-dump-times "Splitting with gen_peephole2" 1 "peephole2" } } */
      28  /* { dg-final { scan-assembler-not "\t(cmpz?|tst). " } } */
      29  /* { dg-final { scan-assembler "bitsi\[^ \]*_ccz(/\[0-9\]+)?\n" } } */
      30  /* { dg-final { scan-assembler "branch_ccz\n" } } */