turning off range simplification

Conway, Christopher L (Christopher)** CTR ** cconway@lucent.com
Fri Jun 25 14:25:00 GMT 2004


> > We're having trouble with what I *think* is a tree
> > dominator optimization.
> >
> > C code:
> >   if( i==1 || i==2 ) { ... }
> >
> > tree-ssa code:
> >   T.1 = i - 1;
> >   T.2 = (unsigned int)T.1;
> >   if (T.2 <= 1) { ... }
> 
> The .t03.original dump contains if ((n - 1) <= 1u. This implies the 
> optimization is performed by fold(), not the tree-ssa optimizers.
> It's probably conditional on -O. Not all optimizations have 
> specific flags to 
> turn them on and off.

Would the maintainers accept a patch to add a flag suppressing the constant folding optimizations? Would turning them off at -O (by choice, I mean, not by default) break other optimization passes?

Chris



More information about the Gcc mailing list