diff options
author | Adam Nemet <anemet@apple.com> | 2016-02-29 22:53:59 +0000 |
---|---|---|
committer | Adam Nemet <anemet@apple.com> | 2016-02-29 22:53:59 +0000 |
commit | 83be06e52960e56ed6b7c78d151bbe4dff941a5f (patch) | |
tree | 9176cef18adea5a2dc77438e919feaba05c0eda2 /llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp | |
parent | 114fa1c3f68033c05f268de743a8cfda6a72a5fa (diff) | |
download | llvm-83be06e52960e56ed6b7c78d151bbe4dff941a5f.zip llvm-83be06e52960e56ed6b7c78d151bbe4dff941a5f.tar.gz llvm-83be06e52960e56ed6b7c78d151bbe4dff941a5f.tar.bz2 |
[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.
llvm-svn: 262267
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp b/llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp index db96bea..a363d24 100644 --- a/llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp +++ b/llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp @@ -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)) |