[PATCH] D15559: [SCEVExpander] Make findExistingExpansion smarter

Michael Zolotukhin via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 5 11:42:20 PST 2016


mzolotukhin added inline comments.

================
Comment at: lib/Analysis/ScalarEvolutionExpander.cpp:1905
@@ +1904,3 @@
+        if (SE.hasOperand(IExpr, S)) {
+          auto *ExistingInst = FindCongruentInst(SE, S, Inst, 0);
+          if (ExistingInst != nullptr &&
----------------
I think `FindCongruentInst` isn't needed right now. The logic in `findExistingExpansion` should basically mirror the logic from `expand`: `expand` just looks at the hash map, so we should do the same here. (And that should do the trick in our example here)


http://reviews.llvm.org/D15559





More information about the llvm-commits mailing list