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

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 8 15:46:23 PST 2022


craig.topper added a comment.

In D121243#3368552 <https://reviews.llvm.org/D121243#3368552>, @spatel wrote:

> 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.

So leave the union TODO, but drop the uncertainty about FCMP_TRUE/FALSE?


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