[PATCH] D48085: [DAGCombiner] restrict (float)((int) f) --> ftrunc with no-signed-zeros

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 19 12:35:22 PDT 2018


lebedev.ri added a comment.

In https://reviews.llvm.org/D48085#1136900, @spatel wrote:

> In https://reviews.llvm.org/D48085#1136860, @lebedev.ri wrote:
>
> > Should this adjust the ReleaseNotes?
>
>
> The docs provide extra warning/workaround, and this change doesn't affect that language IMO (there's less chance we're going to break code, but we don't have to disclose that).
>
> For reference, here are links to the docs that we added with the previous patches (last updated with https://reviews.llvm.org/D46236 I think):
>  https://clang.llvm.org/docs/ReleaseNotes.html#new-compiler-flags
>  https://clang.llvm.org/docs/UsersManual.html#controlling-code-generation
>  http://llvm.org/docs/ReleaseNotes.html#non-comprehensive-list-of-changes-in-this-release
>
> Let me know if you see anything that can be improved.


The text in first and last links suggests that such an optimization is always being done.
But now it will only be done in presence of `no-signed-zeros-fp-math` attribute.
Which is controlled by `-ffast-math` (or maybe some more fine-grained option, too?)


https://reviews.llvm.org/D48085





More information about the llvm-commits mailing list