1  /* PR target/98567 */
       2  /* { dg-do compile } */
       3  /* { dg-options "-O2 -mbmi -fno-stack-protector" } */
       4  /* { dg-final { scan-assembler-times "\tblsi" 4 } } */
       5  /* { dg-final { scan-assembler-times "\tsetle\t" 2 } } */
       6  /* { dg-final { scan-assembler-times "\tsetg\t" 2 } } */
       7  /* { dg-final { scan-assembler-not "\ttest\[ld]" } } */
       8  
       9  int
      10  foo (unsigned long x)
      11  {
      12    return 0 >= (int) (-x & x);
      13  }
      14  
      15  int
      16  bar (unsigned int x)
      17  {
      18    return (int) (-x & x) <= 0;
      19  }
      20  
      21  int
      22  baz (unsigned long x)
      23  {
      24    return (int) (x & -x) > 0;
      25  }
      26  
      27  int
      28  qux (unsigned int x)
      29  {
      30    return 0 < (int) (x & -x);
      31  }