[clang] [clang] Set correct FPOptions if attribute 'optnone' presents (PR #85605)
Serge Pavlov via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 25 11:20:21 PDT 2024
spavloff wrote:
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 optnone contains separate fadd and fmul, while without this attribute the function contains combined operatin fmuladd.
This optimization is turned off in `FPOption.setDisallowOptimizations` (introduced by this patch) by the call `setDisallowFPContract()`. If it is removed, I think, the output would be identical.
https://github.com/llvm/llvm-project/pull/85605
More information about the cfe-commits
mailing list