[PATCH] D143954: [ValueTracking] It is not safe to execute FDIV/FREM speculatively

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 13 15:19:11 PST 2023


craig.topper added inline comments.


================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:4837
+  case Instruction::FRem: {
+    // x / y is undefined if y == 0.0.
+    const APFloat *V;
----------------
I don't think this is correct. x/0.0 is infinity or negative infinity. Unless x is 0.0 in which case it's nan. But in any case its not undefined.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D143954



More information about the llvm-commits mailing list