Serge Pavlov
Serge Pavlov
The reproducer provided here is not related to [65cf77d](https://github.com/llvm/llvm-project/commit/65cf77d218cf8b6aee2dbe252f5512cccc0311c8), because it causes compiler crash with that commit reverted. The problem reported here is fixed by the patch https://reviews.llvm.org/D154359.
As I commented in https://github.com/llvm/llvm-project/issues/64605, this problem is not caused by https://github.com/llvm/llvm-project/commit/fde5924dcc69fe814085482df259b8cfee236f2c, and revert of this commit does not fix the issue.
> Hmm. Is there some sort of optimization in IRGen that we need to suppress here, or is it something in LLVM code gen? Presumably normal LLVM optimization passes all...
> optnone is a very strange attribute; it's a directive to the compiler with no clear semantics. `fast-math` also does not have clear semantics. It is however used to express...
A little about the significance of this fix. To implement pragma FENV_ROUND, we need to apply the FP options stored in the instance of CompoundStmt to the builder object, so...
Thanks! > Is there any existing bookkeeping we no longer need to do if we're going to have this RAII object in scope during function parsing? It seems handling fast-math...
Hi @dyung. The observed difference is due to the FP contraction turned off if optnone is specified. In O0 this optimization is still applied. As a result, the function with...
Hi @wjristow, Thank you for your detailed analysis. Indeed, FPContract looks more like mandatory option rather than optional optimization. I prepared PR: https://github.com/llvm/llvm-project/pull/91061, which fixes this issue.
Hi @SLTozer, Thank you for the report. There is an issue somewhere around the code that reads/wtites records FP_PRAGMA_OPTIONS and/or FLOAT_CONTROL_PRAGMA_OPTIONS, which sometimes manifest itseld in broken synchronization of FP...