[flang-commits] [flang] [flang][Lower] Add alternative real expression lowering (PR #207371)

Tom Eccles via flang-commits flang-commits at lists.llvm.org
Fri Jul 3 07:58:08 PDT 2026


tblah wrote:

Thanks for taking a look.

I wasn't confident that I could argue correctness for `reassoc` (if the user didn't give fastmath flags). From my reading, the fortran standard only permits reassociation within expressions at the fortran language level. After lowering we loose information about which MLIR operations correspond to which source language expressions.

If we added the `reassoc` attribute, our correctness would depend upon not reassociating between fortran language expressions. Thinking about it more now, maybe that could be achieved the same way we model parentheses, but it wouldn't be easy to detect bugs of this kind.

https://github.com/llvm/llvm-project/pull/207371


More information about the flang-commits mailing list