[PATCH] D159084: InstCombine: Fold is.fpclass(x, fcInf) to fabs+fcmp

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 29 04:45:08 PDT 2023


arsenm created this revision.
arsenm added reviewers: sepavloff, jcranmer-intel, foad, andrew.w.kaylor, kpn, cameron.mcinally.
Herald added subscribers: StephenFan, hiraditya.
Herald added a project: All.
arsenm requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.

This is a better canonical form. fcmp and fabs are more widely
understood and fabs can fold for free into some sources.

Addresses todo from D146170 <https://reviews.llvm.org/D146170>


https://reviews.llvm.org/D159084

Files:
  llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
  llvm/test/Transforms/InstCombine/and-fcmp.ll
  llvm/test/Transforms/InstCombine/combine-is.fpclass-and-fcmp.ll
  llvm/test/Transforms/InstCombine/create-class-from-logic-fcmp.ll
  llvm/test/Transforms/InstCombine/is_fpclass.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D159084.554265.patch
Type: text/x-patch
Size: 21005 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230829/8cd7ce6e/attachment.bin>


More information about the llvm-commits mailing list