[PATCH] D158648: InstCombine: Introduce SimplifyDemandedUseFPClass

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 23 11:16:54 PDT 2023


arsenm created this revision.
arsenm added reviewers: jcranmer-intel, RKSimon, spatel, foad, jdoerfert, craig.topper, nikic, bkramer.
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 the floating-point analog of SimplifyDemandedBits. If we know
the edge cases are assumed impossible in uses, it's possible to prune
upstream edge case handling.

      

Start by only using this on returns in functions with nofpclass
returns (where I'm surprised there are no other combines), but this
can be extended to include any other nofpclass use or FPMathOperator
with flags.

      

Partially addresses issue #64870


https://reviews.llvm.org/D158648

Files:
  llvm/include/llvm/Analysis/ValueTracking.h
  llvm/lib/Transforms/InstCombine/InstCombineInternal.h
  llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
  llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
  llvm/test/Transforms/InstCombine/simplify-demanded-fpclass.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158648.552807.patch
Type: text/x-patch
Size: 34447 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230823/23b50797/attachment.bin>


More information about the llvm-commits mailing list