[PATCH] D149587: InstSimplify: Simplifications for ldexp

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 11 04:00:01 PDT 2023


foad added inline comments.


================
Comment at: llvm/lib/Analysis/InstructionSimplify.cpp:6084
+    if (Q.isUndefValue(Op0))
+      return ConstantFP::getNaN(Op0->getType());
+
----------------
arsenm wrote:
> foad wrote:
> > Why is this not strictfp-safe?
> If undef resolved to a signaling nan it wouldn't raise an exception
But here you are //choosing// what you want the undef value to be, so choose a quiet NaN.


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

https://reviews.llvm.org/D149587



More information about the llvm-commits mailing list