blob: 03fc2889c4f78d65b0accd69bee552dc86f5392f [file] [log] [blame]
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-forwprop1 -fdump-tree-optimized" } */
unsigned char foo(int x)
{
int t = -x;
unsigned char t1 = t;
unsigned char t2 = t;
/* We may not rewrite this as (unsigned char)(t - x). */
return t1 + t2;
}
/* { dg-final { scan-tree-dump-times "x_" 1 "forwprop1" } } */
/* { dg-final { scan-tree-dump-times "x_" 1 "optimized" } } */