[PATCH] D147137: [InstSimplify] Extend handlng of fp min/max.

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 26 03:53:07 PDT 2023


RKSimon accepted this revision.
RKSimon added a comment.

LGTM with one minor



================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:7164
   case Intrinsic::umin: return Intrinsic::umax;
+  case Intrinsic::maximum: return Intrinsic::minimum;
+  case Intrinsic::minimum: return Intrinsic::maximum;
----------------
skatkov wrote:
> The documentation for this method does not say whether "inverse" expects that if a != b then max(a, b) != min(a, b).
> For new added cases it is not true.
> 
> So if it is expected I can create another utility function.
No need - but add a comment explaining this for these cases


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

https://reviews.llvm.org/D147137



More information about the llvm-commits mailing list