aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Scalar/InstructionCombining.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-11-10 17:00:47 +0000
committerChris Lattner <sabre@nondot.org>2009-11-10 17:00:47 +0000
commit6b583919d92ca07219cb43853e7a13e4bd42021e (patch)
treeba0b308171b73c066b2ae945e28dfd4439099333 /lib/Transforms/Scalar/InstructionCombining.cpp
parent878141685887b214a86e773c98926dee0526d927 (diff)
clarify logic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86689 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/InstructionCombining.cpp')
-rw-r--r--lib/Transforms/Scalar/InstructionCombining.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp
index e65eaf38ad..efda6608e4 100644
--- a/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -8261,10 +8261,10 @@ Instruction *InstCombiner::commonIntCastTransforms(CastInst &CI) {
// Only do this if the dest type is a simple type, don't convert the
// expression tree to something weird like i93 unless the source is also
// strange.
- if (!isa<IntegerType>(SrcI->getType()) ||
- (ShouldChangeType(SrcI->getType(), DestTy, TD) &&
- CanEvaluateInDifferentType(SrcI, DestTy,
- CI.getOpcode(), NumCastsRemoved))) {
+ if ((isa<VectorType>(DestTy) ||
+ ShouldChangeType(SrcI->getType(), DestTy, TD)) &&
+ CanEvaluateInDifferentType(SrcI, DestTy,
+ CI.getOpcode(), NumCastsRemoved)) {
// If this cast is a truncate, evaluting in a different type always
// eliminates the cast, so it is always a win. If this is a zero-extension,
// we need to do an AND to maintain the clear top-part of the computation,