[PATCH] D65451: [DivRemPairs] Avoid RAUW pitfalls (PR42823)

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 30 09:21:06 PDT 2019


spatel added a comment.

Sorry about the bug - this is why I suggested in the previous review that someone with a better grasp of C++ / data structures have a look. :)
In the original code, if we delay the RAUW by inserting instructions in a ToBeKilled worklist in the loop (and only doing the erasing as a post-processing step) is there still a bug?



================
Comment at: llvm/lib/Transforms/Scalar/DivRemPairs.cpp:62
+  /// In this pair, what are the divident and divisor?
+  Value *getDivident() const { return DivInst->getOperand(0); }
+  Value *getDivisor() const { return DivInst->getOperand(1); }
----------------
spelling: getDivident --> getDividend


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D65451





More information about the llvm-commits mailing list