[PATCH] D112760: Require 'contract' fast-math flag for FMA generation

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 1 15:05:30 PDT 2021


arsenm added a comment.

In D112760#3101240 <https://reviews.llvm.org/D112760#3101240>, @andrew.w.kaylor wrote:

> In D112760#3097718 <https://reviews.llvm.org/D112760#3097718>, @arsenm wrote:
>
>> I would rephrase the description as removing the global flag for contraction
>
> This change also removes the behavior of the function attribute "unsafe=fp-math" enabling fp-contraction.

This attribute has never been handled consistently in the backend. We have attributes approximately corresponding to each of the individual fast math flags, so the mirror of the IR controls would be to just set all of those attributes. I've never been sure how unsafe-fp-math fits in here, other than just a convenience to avoid setting all the others. I would also like to get rid of it, since you should be checking the individual properties anyway.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112760/new/

https://reviews.llvm.org/D112760



More information about the llvm-commits mailing list