aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-07-18 09:21:25 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-07-18 09:21:25 +0000
commit191a0aee4f58f86d697e9eed57205a59e3920b4d (patch)
tree43487e470696a0991aade7d0296f1682a4406427 /lib
parent1694e095c0aa2ab348108f2b3d3b4c4a9756b65f (diff)
downloadexternal_llvm-191a0aee4f58f86d697e9eed57205a59e3920b4d.zip
external_llvm-191a0aee4f58f86d697e9eed57205a59e3920b4d.tar.gz
external_llvm-191a0aee4f58f86d697e9eed57205a59e3920b4d.tar.bz2
Remove no-op check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76302 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Transforms/Scalar/InstructionCombining.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp
index f9e7657..0c010cf 100644
--- a/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -8453,8 +8453,7 @@ Instruction *InstCombiner::visitTrunc(TruncInst &CI) {
uint32_t SrcBitWidth = Src->getType()->getScalarSizeInBits();
// Canonicalize trunc x to i1 -> (icmp ne (and x, 1), 0)
- if (DestBitWidth == 1 &&
- isa<VectorType>(Ty) == isa<VectorType>(Src->getType())) {
+ if (DestBitWidth == 1) {
Constant *One = Context->getConstantInt(Src->getType(), 1);
Src = InsertNewInstBefore(BinaryOperator::CreateAnd(Src, One, "tmp"), CI);
Value *Zero = Context->getNullValue(Src->getType());