blob: f1ff472aaff68e91d8b726a1f689386a61881df2 [file] [log] [blame]
/* { dg-do compile } */
/* { dg-options "-O1 -fdump-tree-phiopt1" } */
unsigned abs_with_convert0 (int x)
{
unsigned int y = x;
if (x < 0)
y = -y;
return y;
}
unsigned abs_with_convert1 (unsigned x)
{
int y = x;
if (y < 0)
x = -x;
return x;
}
/* { dg-final { scan-tree-dump-times "ABSU_EXPR <" 2 "phiopt1" } } */
/* { dg-final { scan-tree-dump-not "if " "phiopt1" } } */