From 191a0aee4f58f86d697e9eed57205a59e3920b4d Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Sat, 18 Jul 2009 09:21:25 +0000 Subject: [PATCH] Remove no-op check. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76302 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/InstructionCombining.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index f9e76578c73..0c010cfa9fe 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(Ty) == isa(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());