1  /* { dg-do compile { target { riscv64*-*-* } } } */
       2  /* { dg-options "-march=rv64gc -mabi=lp64" } */
       3  void
       4  sub (unsigned int wc, unsigned long step, unsigned char *start)
       5  {
       6    do
       7      {
       8        start[--step] = wc;
       9        wc >>= 6;
      10      }
      11    while (step > 1);
      12  }
      13  /* { dg-final { scan-assembler-times "sext.w" 0 } } */