OSDN Git Service

[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)
commitda488468796b9366fb9cd1d8010658077ff7759b
treef26c60cccfad4948f2908a2a23396d4b47a0c40e
parent1c224c03d33d5d1a472b2858ca6a16f73ed4a941
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280600 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/IRBuilder.h
lib/CodeGen/CodeGenPrepare.cpp
test/CodeGen/X86/cmov-into-branch.ll
test/CodeGen/X86/select_meta.ll [new file with mode: 0644]