[LoopPred] Fix a blatantly obvious bug in r358684
authorPhilip Reames <listmail@philipreames.com>
Thu, 18 Apr 2019 17:01:19 +0000 (17:01 +0000)
committerPhilip Reames <listmail@philipreames.com>
Thu, 18 Apr 2019 17:01:19 +0000 (17:01 +0000)
commitadf288c5d93e60a91fe226ae2dcebad0f760a259
tree1f6d97c45218e63cbee36c5a5db4d7953068b9ee
parent51fa60bcbb91961849bef930584ec08ddad8eecf
[LoopPred] Fix a blatantly obvious bug in r358684

The bug is that I didn't check whether the operand of the invariant_loads were themselves invariant.  I don't know how this got missed in the patch and review.  I even had an unreduced test case locally, and I remember handling this case, but I must have lost it in one of the rebases.  Oops.

llvm-svn: 358688
llvm/lib/Transforms/Scalar/LoopPredication.cpp
llvm/test/Transforms/LoopPredication/invariant_load.ll