OSDN Git Service

[SimplifyCFG] propagate branch metadata when creating select (retry r268550 / r268751...
authorSanjay Patel <spatel@rotateright.com>
Fri, 6 May 2016 18:07:46 +0000 (18:07 +0000)
committerSanjay Patel <spatel@rotateright.com>
Fri, 6 May 2016 18:07:46 +0000 (18:07 +0000)
commit2c200f0b65939eb959fca304637a2dfbcc743a3e
tree530f2fc12e6430141199e79d04d0e6a13dee68ab
parent446cee1c45c2f3ea2ce455141f024571e6bd9659
[SimplifyCFG] propagate branch metadata when creating select (retry r268550 / r268751 with possible fix)

Retrying r268550/r268751 which were reverted at r268577/r268765 due a memory sanitizer failure.
I have not been able to reproduce that failure, but I've taken another guess at fixing
the problem in this version of the patch and will watch for another failure.

Original commit message:
Unlike earlier similar fixes, we need to recalculate the branch weights
in this case.

Differential Revision: http://reviews.llvm.org/D19674

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268767 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/SimplifyCFG.cpp
test/Transforms/SimplifyCFG/preserve-branchweights.ll