[PATCH] D153089: ValueTracking: Recognize fpclass clamping select patterns

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 15 17:52:23 PDT 2023


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

Improve computeKnownFPClass select handling to cover the case where
the condition performs a class test. This allows us to recognize
no-nans in cases like:

    
  %not.nan = fcmp ord float %x, 0.0
  %select = select i1 %not.nan, float %x, float 0.0
    

Math library code has edge similar edge case filtering on the inputs
and final results.


https://reviews.llvm.org/D153089

Files:
  llvm/lib/Analysis/ValueTracking.cpp
  llvm/test/Transforms/Attributor/nofpclass-select.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153089.531958.patch
Type: text/x-patch
Size: 19728 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230616/0ee70ad8/attachment.bin>


More information about the llvm-commits mailing list