ckoparkar wrote:

> It seems the result got folded despite potential changes to the rounding mode 
> at run time?

The constexpr evaluator uses 
[getActiveRoundingMode](https://github.com/llvm/llvm-project/blob/main/clang/lib/AST/ExprConstant.cpp#L2765)
 to get the current rounding mode; it is used to evaluate fma, along with 
binary ops like *, +, -, etc. Here are the tests for fma with various rounding 
modes: 
[clang/test/CodeGen/rounding-math.cpp](https://github.com/llvm/llvm-project/blob/main/clang/test/CodeGen/rounding-math.cpp#L15).

> Also, the FENV_ROUND pragma is working despite the warning. Tests should be 
> added.

Is your suggestion to add tests with different rounding modes?

https://github.com/llvm/llvm-project/pull/158048
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to