[PATCH] D67564: [IR] allow fast-math-flags on phi of FP values

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 15 06:26:36 PDT 2019


spatel added a comment.

In D67564#1670055 <https://reviews.llvm.org/D67564#1670055>, @mcberg2017 wrote:

> WRT divergent phi FMF, if you wanted to be pessimistic you could do an intersection(and), doing an inclusion(or) might include too much.  Either way behavior would change.  The intersection already has other prior context in FMF.


Right - we have places (like the IVDescriptors diff in this patch) that intersects FMF. Most IR has uniform FMF because it's set in the front-end and passed as-is through the optimizer. Ie, it takes an LTO scenario (with differing FP optimization flags on compiled modules) to see non-uniform FMF, so it's not that common (yet?).

I don't know of any places in the IR optimizer currently where we'd get this wrong by being too liberal. It's more likely -- as with the SimplifyCFG transform mentioned in the description -- that we lose FMF completely.


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

https://reviews.llvm.org/D67564





More information about the llvm-commits mailing list