diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-06-04 19:57:28 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-06-04 19:57:28 +0000 |
commit | 5359fd2c6628fafbce43b63fa4474258c1ac4c13 (patch) | |
tree | 08fb44642d7603e9ea4d20b170ff30d202a59231 | |
parent | 52b5f0816880e96c4fc781abc1399c56afc8f86d (diff) | |
download | llvm-5359fd2c6628fafbce43b63fa4474258c1ac4c13.zip llvm-5359fd2c6628fafbce43b63fa4474258c1ac4c13.tar.gz llvm-5359fd2c6628fafbce43b63fa4474258c1ac4c13.tar.bz2 |
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.
------------------------------------------------------------------------
llvm-svn: 183245
0 files changed, 0 insertions, 0 deletions