[PATCH] D101727: Fix PR47960 - Incorrect transformation of fabs with nnan flag

Krishna Kariya via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 15 02:58:10 PDT 2021


Krishnakariya added a comment.

Ping @spatel, a gentle reminder. Could you please review the updates on this patch?



================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp:2867-2868
   // fast-math-flags (nsz) or fsub with +0.0 (not fneg) for this to work. We
   // also require nnan because we do not want to unintentionally change the
   // sign of a NaN value.
   // (X <= +/-0.0) ? (0.0 - X) : X --> fabs(X)
----------------
spatel wrote:
> If we are dropping the nnan requirement, this comment should be removed. Can we make that change independently of the change that propagates flags from the select without breaking anything? If so, let's do that first as its own patch before this one.
> If we are dropping the nnan requirement, this comment should be removed. Can we make that change independently of the change that propagates flags from the select without breaking anything? If so, let's do that first as its own patch before this one.




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

https://reviews.llvm.org/D101727



More information about the llvm-commits mailing list