projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0b063de
)
Simplify the code.
author
Zhou Sheng
<zhousheng00@gmail.com>
Fri, 23 Mar 2007 02:39:25 +0000
(
02:39
+0000)
committer
Zhou Sheng
<zhousheng00@gmail.com>
Fri, 23 Mar 2007 02:39:25 +0000
(
02:39
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35275
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Scalar/InstructionCombining.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Scalar/InstructionCombining.cpp
b/lib/Transforms/Scalar/InstructionCombining.cpp
index ddbb607d450cd944826dd0c090e25c20a0323487..6d4a8ddb265cbd1bf69b3458e3761285a5162cef 100644
(file)
--- 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())