[LLE] Check for mismatching types between the store and the load earlier
authorAdam Nemet <anemet@apple.com>
Thu, 24 Mar 2016 17:59:26 +0000 (17:59 +0000)
committerAdam Nemet <anemet@apple.com>
Thu, 24 Mar 2016 17:59:26 +0000 (17:59 +0000)
commit7aba60c853634f42988544c8150b3510cc7468fd
tree620480ea69e06b3793884e4a4c584934d3185ee2
parent107ac9e1aab2d27e6fdd2956585fbce47a03c627
[LLE] Check for mismatching types between the store and the load earlier

isDependenceDistanceOfOne asserts that the store and the load access
through the same type.  This function is also used by
removeDependencesFromMultipleStores so we need to make sure we filter
out mismatching types before reaching this point.

Now we do this when the initial candidates are gathered.

This is a refinement of the fix made in r262267.

Fixes PR27048.

llvm-svn: 264313
llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp
llvm/test/Transforms/LoopLoadElim/type-mismatch.ll