From c8fc08c31b1554bc852cc5fc8241c00bd5ac52b1 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Fri, 30 May 2014 18:34:43 +0000 Subject: 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 --- llvm/lib/Transforms/Utils/SimplifyCFG.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'llvm/lib/Transforms/Utils') 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: -- cgit v1.2.3