aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Utils/SimplifyCFG.cpp
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2011-04-29 18:47:25 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2011-04-29 18:47:25 +0000
commit8a70192b510e2a0f05493b9212e998017f3d178d (patch)
tree51617ac863e94c5d1b82f54b32f80c90ad714f75 /lib/Transforms/Utils/SimplifyCFG.cpp
parentc8497b6a2565046b5e6b5f2ea9dedc62b53dd966 (diff)
SimplifyCFG: Add Trunc, ZExt and SExt to the list of cheap instructions for phi node folding
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130526 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/SimplifyCFG.cpp')
-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 5177d33959..1bddecb8c4 100644
--- a/lib/Transforms/Utils/SimplifyCFG.cpp
+++ b/lib/Transforms/Utils/SimplifyCFG.cpp
@@ -261,6 +261,9 @@ static bool DominatesMergePoint(Value *V, BasicBlock *BB,
case Instruction::LShr:
case Instruction::AShr:
case Instruction::ICmp:
+ case Instruction::Trunc:
+ case Instruction::ZExt:
+ case Instruction::SExt:
break; // These are all cheap and non-trapping instructions.
}