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

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 8 12:19:10 PST 2022


craig.topper created this revision.
craig.topper added reviewers: spatel, nlopes, lebedev.ri, RKSimon, nikic.
Herald added a subscriber: hiraditya.
Herald added a project: All.
craig.topper requested review of this revision.
Herald added a project: LLVM.

This patch intersects the fast math flags from the two fcmps instead
of dropping them.

I poked at this a bunch with Alive2 for nnan and ninf flags and it seemed
to check out. With the other flags it told me "Couldn't prove the
correctness of the transformation". Not sure if I should just preserve
nnan and ninf?


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D121243

Files:
  llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
  llvm/test/Transforms/InstCombine/and-fcmp.ll
  llvm/test/Transforms/InstCombine/or-fcmp.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121243.413899.patch
Type: text/x-patch
Size: 3927 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220308/a8b5831a/attachment.bin>


More information about the llvm-commits mailing list