[EarlyCSE] Don't hide earler invariant.scopes
authorPhilip Reames <listmail@philipreames.com>
Thu, 15 Mar 2018 18:12:27 +0000 (18:12 +0000)
committerPhilip Reames <listmail@philipreames.com>
Thu, 15 Mar 2018 18:12:27 +0000 (18:12 +0000)
commit422024a1b70be2745733d83aacca14a915e762c7
tree92447b10a228da7e91137e716b9da876c7212df3
parentc99042ba973be37d9a5bcbb258f83251bf36b673
[EarlyCSE] Don't hide earler invariant.scopes

If we've already established an invariant scope with an earlier generation, we don't want to hide it in the scoped hash table with one with a later generation.  I noticed this when working on the invariant-load handling, but it also applies to the invariant.start case as well.

Without this change, my previous patch for invariant-load regresses some cases, so I'm pushing this without waiting for review.  This is why you don't make last minute tweaks to patches to catch "obvious cases" after it's already been reviewed.  Bad Philip!

llvm-svn: 327655
llvm/lib/Transforms/Scalar/EarlyCSE.cpp
llvm/test/Transforms/EarlyCSE/invariant-loads.ll
llvm/test/Transforms/EarlyCSE/invariant.start.ll