propagate 'unpredictable' metadata on select instructions
authorSanjay Patel <spatel@rotateright.com>
Thu, 17 Mar 2016 15:30:52 +0000 (15:30 +0000)
committerSanjay Patel <spatel@rotateright.com>
Thu, 17 Mar 2016 15:30:52 +0000 (15:30 +0000)
commit9e23fedaf0f84d4a020514df4beefe65fe6da50b
tree420dd16d18265ca8093bee18ef4d625e3d3d4f3e
parent071a099102a4183309dbc80d52fc2454a9222f1e
propagate 'unpredictable' metadata on select instructions

This is similar to D18133 where we allowed profile weights on select instructions.
This extends that change to also allow the 'unpredictable' attribute of branches to apply to selects.

A test to check that 'unpredictable' metadata is preserved when cloning instructions was checked in at:
http://reviews.llvm.org/rL263648

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

llvm-svn: 263716
llvm/include/llvm/IR/IRBuilder.h
llvm/lib/Transforms/Utils/SimplifyCFG.cpp
llvm/test/Transforms/SimplifyCFG/PhiEliminate2.ll