[Profile] preserve branch metadata lowering select in CGP
authorXinliang David Li <davidxl@google.com>
Sat, 3 Sep 2016 21:26:36 +0000 (21:26 +0000)
committerXinliang David Li <davidxl@google.com>
Sat, 3 Sep 2016 21:26:36 +0000 (21:26 +0000)
commit241e6c70865b52d72f7e6a28194932d01c12989c
treed35ecbca767c4a097eaf5bd3a76696f4ab31c644
parentebb34348500aa8dd93125e71e36da779339d89a1
[Profile] preserve branch metadata lowering select in CGP

CGP currently drops select's MD_prof profile data when
generating conditional branch which can lead to bad
code layout. The patch fixes the issue.

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

llvm-svn: 280600
llvm/include/llvm/IR/IRBuilder.h
llvm/lib/CodeGen/CodeGenPrepare.cpp
llvm/test/CodeGen/X86/cmov-into-branch.ll
llvm/test/CodeGen/X86/select_meta.ll [new file with mode: 0644]