summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
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
commitb8f79ba10eb8dde27d15d2ccb79b817a0fbe9d96 (patch)
tree34116bdde2d73625549e9bc52067bc4ded651475 /llvm/lib/Transforms
parent68ac06142b606fe61bd2f145664a298c35900f18 (diff)
downloadbcm5719-llvm-b8f79ba10eb8dde27d15d2ccb79b817a0fbe9d96.tar.gz
bcm5719-llvm-b8f79ba10eb8dde27d15d2ccb79b817a0fbe9d96.zip
clarify logic.
llvm-svn: 86689
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/InstructionCombining.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
index e65eaf38ad8..efda6608e44 100644
--- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/llvm/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,
OpenPOWER on IntegriCloud