(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
combine-clobber.c
       1  /* { dg-do compile { target i?86-*-* x86_64-*-* } } */
       2  /* { dg-options "-O2 -fdump-rtl-combine-all" } */
       3  
       4  /* This testcase checks if combine tries to combine sequences where the last
       5     insn has a clobber of a reg, and a previous insn sets that reg.
       6  
       7     In this case, we have three insns
       8  
       9     (set flags (compare a b))
      10     (set tmp (eq flags 0))
      11     (parallel [(set dst (neg tmp))
      12  	      (clobber flags)])
      13  
      14     Previously, combine would not try the three-insn combination because of
      15     the set and clobber of flags.  Now it does.  Test that.  */
      16  
      17  
      18  int f(int a, int b) { return -(a == b); }
      19  
      20  /* This regexp works for reg parameters as well as mem parameters.  */
      21  /* { dg-final { scan-rtl-dump {neg:SI[^:]*eq:SI[^:]*:SI} "combine" } } */