(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
cris/
pr93372-38.c
       1  /* { dg-do compile } */
       2  /* { dg-options "-O2" } */
       3  /* { dg-final { scan-assembler-not {\tcmp|\tsub\.|\tadd\.|\tmovu|\tmovs} } } */
       4  /* { dg-final { scan-assembler-times "\ttest\.w" 4 } } */
       5  /* { dg-final { scan-assembler-times "\tadds" 1 } } */
       6  /* { dg-final { scan-assembler-times "\tsubs" 1 } } */
       7  /* { dg-final { scan-assembler-times "\taddu" 1 } } */
       8  /* { dg-final { scan-assembler-times "\tsubu" 1 } } */
       9  
      10  /* Check that we produce sign- and zero-extended additions and
      11     subtractions, also for 8-bit to 16-bit results.  Note that we can't
      12     eliminate compare insns, as the condition codes reflect the 32-bit
      13     result.
      14     This test-case is brittle, as with the presence of compare
      15     instructions, there are several optimal instruction sequence, some of
      16     which match the non-matcher patterns and do not contain the matching
      17     patterns. */
      18  
      19  #define t unsigned char
      20  #define t2 unsigned short
      21  #define s _us
      22  #include "pr93372-36.c"
      23  
      24  #undef t
      25  #undef s
      26  #undef t2
      27  #define t signed char
      28  #define t2 signed short
      29  #define s _ss
      30  #include "pr93372-36.c"