[llvm] [SelectionDAGBuilder] Propagate fast-math flags to fpext (PR #167574)

Shunsuke Watanabe via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 18 22:30:52 PST 2025


s-watanabe314 wrote:

>From Clang's perspective, this optimization appears permissible because `-ffast-math`, which enables aggressive optimizations, is specified. From an IR perspective, it also seems acceptable, as this optimization is permitted by the semantics of the `fast` flags. Is this understanding correct? My interpretation at the IR level is that the `contract` flags (which is implied by 'fast') led to the removal of `fptrunc` and `fpext` in this case.

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


More information about the llvm-commits mailing list