[llvm] r262267 - [LLE] Fix SingleSource/Benchmarks/Polybench/stencils/jacobi-2d-imper with Polly

Adam Nemet via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 29 14:53:59 PST 2016


Author: anemet
Date: Mon Feb 29 16:53:59 2016
New Revision: 262267

URL: http://llvm.org/viewvc/llvm-project?rev=262267&view=rev
Log:
[LLE] Fix SingleSource/Benchmarks/Polybench/stencils/jacobi-2d-imper with Polly

We can actually have dependences between accesses with different
underlying types.  Bail in this case.

A test will follow shortly.

Modified:
    llvm/trunk/lib/Transforms/Scalar/LoopLoadElimination.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/LoopLoadElimination.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopLoadElimination.cpp?rev=262267&r1=262266&r2=262267&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopLoadElimination.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopLoadElimination.cpp Mon Feb 29 16:53:59 2016
@@ -429,6 +429,11 @@ public:
     unsigned NumForwarding = 0;
     for (const StoreToLoadForwardingCandidate Cand : StoreToLoadDependences) {
       DEBUG(dbgs() << "Candidate " << Cand);
+      // Only progagate value if they are of the same type.
+      if (Cand.Store->getPointerOperand()->getType() !=
+          Cand.Load->getPointerOperand()->getType())
+        continue;
+
       // Make sure that the stored values is available everywhere in the loop in
       // the next iteration.
       if (!doesStoreDominatesAllLatches(Cand.Store->getParent(), L, DT))




More information about the llvm-commits mailing list