[PATCH] D150728: ValueTracking: Drop rounding mode check for constrained_sqrt in CannotBeNegativeZero

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 16 14:31:28 PDT 2023


arsenm created this revision.
arsenm added reviewers: kpn, jcranmer-intel, foad, andrew.w.kaylor, sepavloff, scanon, 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.

The only value that can produce -0 is exactly -0, no rounding is involved. If the
denormal mode has flushed denormal inputs, a negative value could produce -0.
The constrained intrinsics do not track the denormal mode, and this is just
generally broken in the current set of FP predicates. The move to computeKnownFPClass
will address some of these issues.


https://reviews.llvm.org/D150728

Files:
  llvm/lib/Analysis/ValueTracking.cpp
  llvm/test/Transforms/InstSimplify/strictfp-sqrt-nonneg.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150728.522792.patch
Type: text/x-patch
Size: 12215 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230516/4a4ef8d5/attachment.bin>


More information about the llvm-commits mailing list