1  /* { dg-do compile } */ 
       2  /* { dg-options "-O2 -fdump-tree-pre-stats" } */
       3  #ifdef _WIN64
       4  #define LONG long long
       5  #else
       6  #define LONG long
       7  #endif
       8  
       9  unsigned LONG outcnt;
      10  extern void flush_outbuf(void);
      11  
      12  void
      13  bi_windup(unsigned int *outbuf, unsigned int bi_buf)
      14  {
      15      unsigned LONG t1 = outcnt;
      16      outbuf[t1] = bi_buf;
      17  
      18      unsigned LONG t2 = outcnt;
      19      if (t2 == 16384)
      20        flush_outbuf();
      21  
      22      unsigned LONG t3 = outcnt;
      23      outbuf[t3] = bi_buf;
      24  }
      25  /* We should eliminate one load of outcnt, which will in turn let us eliminate
      26     one multiply of outcnt which will in turn let us eliminate
      27     one add involving outcnt and outbuf.  */
      28  /* { dg-final { scan-tree-dump-times "Eliminated: 3" 1 "pre" { target { ! { avr-*-* msp430-*-* } } } } } */
      29  /* { dg-final { scan-tree-dump-times "Eliminated: 4" 1 "pre" { target avr-*-* msp430-*-* } } } */