[PATCH] D139130: InstCombine: Fold and/or of fcmp into class

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 1 11:11:30 PST 2022


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

This is motivated by patterns like !isfinite || zero. The AMDGPU math
libraries have a lot of patterns like this, and I'm trying to fix the
code to be more portable and less dependent on directly calling class
intrinsics.

      

I believe this is the first place where new is.fpclass calls are
introduced. There are more class-like compares that could be
recognized; this is a set I currently care about plus a few extras.

      

The alive2 opt plugin is happy with this set of tests (although this
isn't testing functions with DAZ). The questions surrounding DAZ
treatment of is.fpclass still apply I mentioned in D139032 <https://reviews.llvm.org/D139032>.


https://reviews.llvm.org/D139130

Files:
  llvm/include/llvm/IR/PatternMatch.h
  llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
  llvm/test/Transforms/InstCombine/create-class-from-logic-fcmp.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139130.479367.patch
Type: text/x-patch
Size: 27760 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221201/5bc010f6/attachment.bin>


More information about the llvm-commits mailing list