[PATCH] D26877: Minor fixes in Loop Strength Reduction

Evgeny Stupachenko via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 22 14:25:04 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:
> evstupac wrote:
> > 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().
> > 
> Okay; makes sense to me.
I'm I right that I can go ahead and commit this part?
Or we still need a test case?
Wei Mi gave me a test case, so I can add it here. But I don't think that for the changes like this we need a test case in LIT tests.


Repository:
  rL LLVM

https://reviews.llvm.org/D26877





More information about the llvm-commits mailing list