Re: [RFA][PATCH] Eliminate more unnecessary type conversions

2013-04-29 Thread Richard Biener
On Fri, Apr 26, 2013 at 8:53 PM, Jeff Law wrote: > > So looking at more dumps made it pretty obvious that my previous patch to > tree-vrp.c to eliminate useless casts to boolean types which fed into > comparisons could and should be generalized. > > Given: > > x1 = (T1) x0; > if (x1 COND CONST

[RFA][PATCH] Eliminate more unnecessary type conversions

2013-04-26 Thread Jeff Law
So looking at more dumps made it pretty obvious that my previous patch to tree-vrp.c to eliminate useless casts to boolean types which fed into comparisons could and should be generalized. Given: x1 = (T1) x0; if (x1 COND CONST) If the known value range for x0 fits into T1, then we can