[PATCH] D84399: [SCEVExpander] Avoid re-using existing casts if it means updating users.

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 31 10:48:29 PDT 2020


lebedev.ri added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp:70
+    if (IP->getParent() == CI->getParent() &&
+        (&*IP == CI || CI->comesBefore(&*IP))) {
+      Ret = CI;
----------------
Note that `comesBefore()` only handles same-BB cases.
Should this be something like this instead?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D84399



More information about the llvm-commits mailing list