mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-12 13:30:51 +00:00
Merging r182989:
------------------------------------------------------------------------ r182989 | atrick | 2013-05-30 23:43:25 -0700 (Thu, 30 May 2013) | 13 lines Fix ScalarEvolution::ComputeExitLimitFromCond for 'or' conditions. Fixes PR16130 - clang produces incorrect code with loop/expression at -O2. This is a 2+ year old bug that's now holding up the release. It's a case where we knowingly made aggressive assumptions about undefined behavior. These assumptions are wrong when SCEV is computing a subexpression that does not directly control the branch. With this fix, we avoid making assumptions in those cases but still optimize the common case. SCEV's trip count computation for exits controlled by 'or' expressions is now analagous to the trip count computation for loops with multiple exits. I had already fixed the multiple exit case to be conservative. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@183245 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3f383efaef
commit
4e7df86628