[polly] r299663 - [FIX] Fix ScheduleTreeOptimizer::optimizeMatMulPattern

Roman Gareev via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 6 10:25:08 PDT 2017


Author: romangareev
Date: Thu Apr  6 12:25:08 2017
New Revision: 299663

URL: http://llvm.org/viewvc/llvm-project?rev=299663&view=rev
Log:
[FIX] Fix ScheduleTreeOptimizer::optimizeMatMulPattern

Use new values of the dimensions during their permutation.

Modified:
    polly/trunk/lib/Transform/ScheduleOptimizer.cpp

Modified: polly/trunk/lib/Transform/ScheduleOptimizer.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Transform/ScheduleOptimizer.cpp?rev=299663&r1=299662&r2=299663&view=diff
==============================================================================
--- polly/trunk/lib/Transform/ScheduleOptimizer.cpp (original)
+++ polly/trunk/lib/Transform/ScheduleOptimizer.cpp Thu Apr  6 12:25:08 2017
@@ -1314,7 +1314,7 @@ __isl_give isl_schedule_node *ScheduleTr
   int NewJ = MMI.j == DimOutNum - 3 ? MMI.i : MMI.j;
   int NewK = MMI.k == DimOutNum - 3 ? MMI.i : MMI.k;
   Node = permuteBandNodeDimensions(Node, NewJ, DimOutNum - 2);
-  NewK = MMI.k == DimOutNum - 2 ? MMI.j : MMI.k;
+  NewK = NewK == DimOutNum - 2 ? NewJ : NewK;
   Node = permuteBandNodeDimensions(Node, NewK, DimOutNum - 1);
   auto MicroKernelParams = getMicroKernelParams(TTI, MMI);
   auto MacroKernelParams = getMacroKernelParams(MicroKernelParams, MMI);




More information about the llvm-commits mailing list