diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2014-05-30 18:34:43 +0000 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2014-05-30 18:34:43 +0000 |
commit | c8fc08c31b1554bc852cc5fc8241c00bd5ac52b1 (patch) | |
tree | 77eef4aa8797d50b7aa5f7584c1c1b402da72818 /llvm/lib/Transforms/Utils | |
parent | a0d4c0d1fcb7b6b5cbfc5468bf94329d2e6a223f (diff) | |
download | bcm5719-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.cpp | 3 |
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: |