Currently the control of the eval-method is mixed with fast-math.
FLT_EVAL_METHOD tells the user the precision at which, temporary results are evaluated but when fast-math is enabled, the numeric values are not guaranteed to match the source semantics, so the eval-method is meaningless. For example, the expression `x + y + z` has as source semantics `(x + y) + z`. FLT_EVAL_METHOD is telling the user at which precision `(x + y)` is evaluated. With fast-math enable the compiler can choose to evaluate the expression as `(y + z) + x`. The correct behavior is to set the FLT_EVAL_METHOD to `-1` to tell the user that the precision of the intermediate values is unknow. This patch is doing that. Differential Revision: https://reviews.llvm.org/D121122
Loading
Please sign in to comment