Skip to content

Commit

Permalink
[LLE] Fix SingleSource/Benchmarks/Polybench/stencils/jacobi-2d-imper …
Browse files Browse the repository at this point in the history
…with Polly

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

A test will follow shortly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262267 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
anemet committed Feb 29, 2016
1 parent 912dbc9 commit 2e073f5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/Transforms/Scalar/LoopLoadElimination.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,11 @@ class LoadEliminationForLoop {
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))
Expand Down

0 comments on commit 2e073f5

Please sign in to comment.