1 /* { dg-do compile } */
2 /* This test checks for if-conversion of one's complement
3  * abs function.  */
4 /* { dg-options "-O -mtune=generic" } */
5 /* { dg-final { scan-assembler "cltd" } } */
6 /* { dg-final { scan-assembler "xor" } } */
7 
8 /* Check code generation for one's complement version of abs */
9 
onecmplabs(int x)10 int onecmplabs(int x)
11 {
12   if (x < 0)
13     x = ~x;
14   return x;
15 }
16