]> granicus.if.org Git - llvm/commit
Fix a bug in getSCEVAtScope w.r.t. non-canonical loops
authorPhilip Reames <listmail@philipreames.com>
Tue, 11 Jun 2019 23:21:24 +0000 (23:21 +0000)
committerPhilip Reames <listmail@philipreames.com>
Tue, 11 Jun 2019 23:21:24 +0000 (23:21 +0000)
commite5bf57d8b8e9a29ef24b75172b1dcccda87ecfaa
treee3f235fb8f14bf40dd309a8826f818d39172e34f
parent28bea3dbfef348e53cf48f921e96a35b642b3950
Fix a bug in getSCEVAtScope w.r.t. non-canonical loops

The issue is that if we have a loop with multiple predecessors outside the loop, the code was expecting to merge them and only return if equal, but instead returned the first one seen.

I have no idea if this actually tripped anywhere.  I noticed it by accident when reading the code and have no idea how to go about constructing a test case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363112 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ScalarEvolution.cpp