summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorZhou Sheng <zhousheng00@gmail.com>2007-03-23 02:39:25 +0000
committerZhou Sheng <zhousheng00@gmail.com>2007-03-23 02:39:25 +0000
commit755f04b5d7c42c46b29680cf326a71d1c8a7992f (patch)
tree307d0731da844f0d7f849bf6e2a32c75749ab582 /llvm/lib
parenta824e79f06bbad3fa5549bcaeef320e4949f243b (diff)
downloadbcm5719-llvm-755f04b5d7c42c46b29680cf326a71d1c8a7992f.tar.gz
bcm5719-llvm-755f04b5d7c42c46b29680cf326a71d1c8a7992f.zip
Simplify the code.
llvm-svn: 35275
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Scalar/InstructionCombining.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
index ddbb607d450..6d4a8ddb265 100644
--- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -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())
OpenPOWER on IntegriCloud