[PATCH] D121243: [InstCombine] Preserve FMF in foldLogicOfFCmps.

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 8 15:13:37 PST 2022


spatel accepted this revision.
spatel added a comment.
This revision is now accepted and ready to land.

In D121243#3368365 <https://reviews.llvm.org/D121243#3368365>, @nlopes wrote:

> We convert `fcmp true` to `true`, but that is wrong as we lose the fast-math flags. Let me fix that.

Thanks for the fix! So we can remove the code comment about the fcmp predicates, and I think this patch is fine. 
Note that we've (slowly) been moving away from relying on FMF on fcmp and trying to put FMF directly on all FP values instead. I'm not sure how many transforms are predicated on FMF on fcmp at this point, but it may go to zero some day.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D121243



More information about the llvm-commits mailing list