[PATCH] D26877: Minor fixes in Loop Strength Reduction

Evgeny Stupachenko via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 20 11:49:12 PST 2016


evstupac added inline comments.


================
Comment at: lib/Transforms/Scalar/LoopStrengthReduce.cpp:4149
         Best = Reg;
-      else {
+        BestNum = RegUses.getUsedByIndices(Reg).count();
+      } else {
----------------
hfinkel wrote:
> Do you have a test case for this change?
> 
> If/When you commit this, it should be separate from the other changes.
No. I don't. I can try to create.
However, it looks like a misprint in MAX search algorithm. We are always missing the case when first Reg in RegUses has the biggest RegUses.getUsedByIndices(...).count().



Repository:
  rL LLVM

https://reviews.llvm.org/D26877





More information about the llvm-commits mailing list