Remove no-op check.
authorEli Friedman <eli.friedman@gmail.com>
Sat, 18 Jul 2009 09:21:25 +0000 (09:21 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Sat, 18 Jul 2009 09:21:25 +0000 (09:21 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76302 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/InstructionCombining.cpp

index f9e76578c73255aa569267376e7af3d3254977e5..0c010cfa9fe943e7787d86a3b4a0d931a331b38e 100644 (file)
@@ -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());