[PATCH] D149587: InstSimplify: Simplifications for ldexp

Kevin P. Neal via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 12 10:34:44 PDT 2023


kpn added inline comments.


================
Comment at: llvm/lib/Analysis/InstructionSimplify.cpp:6100
+  // ldexp(-inf, x) -> -inf
+  if (C && (C->isZero() || C->isInfinity()))
+    return Op0;
----------------
arsenm wrote:
> foad wrote:
> > Also handle qNaN here?
> Technically would add more brokenness to old mips signaling nans although I don’t think we have a ruling on how much we should care 
Isn't this a problem that should be solved in APFloat? Anyway, it seems like we shouldn't let old mips keep us from optimizing in the present.


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

https://reviews.llvm.org/D149587



More information about the llvm-commits mailing list