At Thu, 3 Jan 2008 10:00:54 +0100,
Jochen Küpper wrote:
> Is this an optimization that is considered valid even for floating- 
> point calculations in compiler building?

For general variables no, I don't think so - it only is used if there are
constants on both sides and -ffast-math/-funsafe-math-optimizations is
enabled.  e.g. x+1==1 is converted to x==0 and x+2=3 is converted to x==1.
If -ffast-math is not used any comparisons should not be modified.

Reply via email to