summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2014-05-30 18:34:43 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2014-05-30 18:34:43 +0000
commitc4e0611d86a6501fd987af04170ddecfe56fa794 (patch)
tree13b0430b165697c783021d777ce9a7f894c4a2e6 /lib
parent731d23ed42db0f876f0c9b2a3985637ef4ec8384 (diff)
downloadllvm-c4e0611d86a6501fd987af04170ddecfe56fa794.tar.gz
llvm-c4e0611d86a6501fd987af04170ddecfe56fa794.tar.bz2
llvm-c4e0611d86a6501fd987af04170ddecfe56fa794.tar.xz
Make bitcast, extractelement, and insertelement considered cheap for speculation.
This helps more branches into selects. On R600, vectors are cheap and anything that helps remove branches is very good. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209914 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Transforms/Utils/SimplifyCFG.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Transforms/Utils/SimplifyCFG.cpp b/lib/Transforms/Utils/SimplifyCFG.cpp
index 150dbdd4ec..e155daf6fc 100644
--- a/lib/Transforms/Utils/SimplifyCFG.cpp
+++ b/lib/Transforms/Utils/SimplifyCFG.cpp
@@ -227,6 +227,9 @@ static unsigned ComputeSpeculationCost(const User *I) {
case Instruction::Trunc:
case Instruction::ZExt:
case Instruction::SExt:
+ case Instruction::BitCast:
+ case Instruction::ExtractElement:
+ case Instruction::InsertElement:
return 1; // These are all cheap.
case Instruction::Call: