Remove no-op check.

llvm-svn: 76302
This commit is contained in:
Eli Friedman 2009-07-18 09:21:25 +00:00
parent 44e9836b17
commit 992d0e0b74
1 changed files with 1 additions and 2 deletions

View 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());