dyung 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.
Thanks @spavloff. I can confirm that if I remove the call you mentioned the assembly generated is identical. I am slightly confused why we are running FP contraction at O0. I would have thought no optimization at all be done at O0? https://github.com/llvm/llvm-project/pull/85605 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits