[PATCH] D149587: InstSimplify: Simplifications for ldexp

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 12 11:34:18 PDT 2023


arsenm added inline comments.


================
Comment at: llvm/lib/Analysis/InstructionSimplify.cpp:6100
+  // ldexp(-inf, x) -> -inf
+  if (C && (C->isZero() || C->isInfinity()))
+    return Op0;
----------------
kpn wrote:
> 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.
APFloat would need to know what to do and maybe treat it as a separate type. Maybe it should be part of DataLayout, I don’t know 


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

https://reviews.llvm.org/D149587



More information about the llvm-commits mailing list