aboutsummaryrefslogtreecommitdiffstats
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
commit9c636fe6f2e8dfb7502e3d60dfe29f3cfd5b19e6 (patch)
treeec99496da7d14d57e6636bfe5df4e4d128bae234
parent0b063def9809ed59797fd40a616665ac3e675657 (diff)
downloadexternal_llvm-9c636fe6f2e8dfb7502e3d60dfe29f3cfd5b19e6.tar.gz
external_llvm-9c636fe6f2e8dfb7502e3d60dfe29f3cfd5b19e6.tar.bz2
external_llvm-9c636fe6f2e8dfb7502e3d60dfe29f3cfd5b19e6.zip
Simplify the code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35275 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Transforms/Scalar/InstructionCombining.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp
index ddbb607d45..6d4a8ddb26 100644
--- a/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/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())