[PATCH] D157281: ValueTracking: Add computeKnownExponentRange

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 7 06:22:55 PDT 2023


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

Perform basic floating-point range analysis for the exponent.

      

I was looking into handling multiply by a constant to perform denorm
scaling to match the current ldexp handling in computeKnownFPClass,
and went a bit overboard on generalizing the helper function for it.

      

I also find these fltSemantics getters incredibly annoying and think
the struct definition should just be public (along with all the
definitions for it).


https://reviews.llvm.org/D157281

Files:
  llvm/include/llvm/ADT/APFloat.h
  llvm/include/llvm/Analysis/ValueTracking.h
  llvm/lib/Analysis/ValueTracking.cpp
  llvm/lib/Support/APFloat.cpp
  llvm/unittests/Analysis/ValueTrackingTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D157281.547761.patch
Type: text/x-patch
Size: 38020 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230807/082435a2/attachment.bin>


More information about the llvm-commits mailing list