
April 6, 2009
7:30 p.m.
[Antoine]
- Issue #5593: code like 1e16+2.9999 is optimized away and its result stored as a constant (again), but the result can vary slightly depending on the internal FPU precision. [Guido] I would just not bother constant folding involving FP, or only if the values involved have an exact representation in IEEE binary FP format.
+1 for removing constant folding for floats (besides conversion of -<literal>). There are just too many things to worry about: FPU rounding mode and precision, floating-point signals and flags, effect of compiler flags, and the potential benefit seems small. Mark