Simplify the code.

llvm-svn: 35275
This commit is contained in:
Zhou Sheng 2007-03-23 02:39:25 +00:00
parent a824e79f06
commit 755f04b5d7
1 changed files with 1 additions and 1 deletions

View File

@ -6801,7 +6801,7 @@ static bool CanEvaluateInDifferentType(Value *V, const IntegerType *Ty,
// already zeros.
if (ConstantInt *CI = dyn_cast<ConstantInt>(I->getOperand(1))) {
uint32_t BitWidth = OrigTy->getBitWidth();
if (Ty->getBitWidth() < OrigTy->getBitWidth() &&
if (Ty->getBitWidth() < BitWidth &&
MaskedValueIsZero(I->getOperand(0),
APInt::getAllOnesValue(BitWidth) &
APInt::getAllOnesValue(Ty->getBitWidth()).zextOrTrunc(BitWidth).flip())