[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
Wed May 17 07:29:32 PDT 2023


arsenm marked an inline comment as done.
arsenm added inline comments.


================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:3809
+      // sqrt(-0.0) = -0.0, no other negative results are possible.
+      // FIXME: Account for denormal-fp-math=preserve-sign denormal inputs
     case Intrinsic::canonicalize:
----------------
sepavloff wrote:
> Is this FIXME useful? How could denormal handling change this  behavior?
If you have preserve-sign inputs, another negative denormal could be implicitly treated as -0 and return -0. This is fixed in the new computeKnownFPClass  implementation 


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150728/new/

https://reviews.llvm.org/D150728



More information about the llvm-commits mailing list