[LoopPred] Fix a bug in unconditional latch bailout introduced in r362284
authorPhilip Reames <listmail@philipreames.com>
Thu, 6 Jun 2019 18:02:36 +0000 (18:02 +0000)
committerPhilip Reames <listmail@philipreames.com>
Thu, 6 Jun 2019 18:02:36 +0000 (18:02 +0000)
commit101915cfdaba9284b5bb8dedbbca2b7788f68da4
treef100bd19831bb25c221b15533c89883a536e2afd
parentbd9e810b23b7907a133664a64407df3993f2426a
[LoopPred] Fix a bug in unconditional latch bailout introduced in r362284

This is a really silly bug that even a simple test w/an unconditional latch would have caught.  I tried to guard against the case, but put it in the wrong if check.  Oops.

llvm-svn: 362727
llvm/lib/Transforms/Scalar/LoopPredication.cpp
llvm/test/Transforms/LoopPredication/basic.ll