summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils
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
commitc8fc08c31b1554bc852cc5fc8241c00bd5ac52b1 (patch)
tree77eef4aa8797d50b7aa5f7584c1c1b402da72818 /llvm/lib/Transforms/Utils
parenta0d4c0d1fcb7b6b5cbfc5468bf94329d2e6a223f (diff)
downloadbcm5719-llvm-c8fc08c31b1554bc852cc5fc8241c00bd5ac52b1.tar.gz
bcm5719-llvm-c8fc08c31b1554bc852cc5fc8241c00bd5ac52b1.zip
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. llvm-svn: 209914
Diffstat (limited to 'llvm/lib/Transforms/Utils')
-rw-r--r--llvm/lib/Transforms/Utils/SimplifyCFG.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
index 150dbdd4ec4..e155daf6fcc 100644
--- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
+++ b/llvm/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:
OpenPOWER on IntegriCloud