summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-12-06 06:25:04 +0000
committerChris Lattner <sabre@nondot.org>2007-12-06 06:25:04 +0000
commitd2bbbabbfb93ab582477c24fea221862af1588a9 (patch)
tree6a1a6b049c9f5cb9732a7f74032145ee4fb81937 /llvm/lib/Transforms
parent42558bf66453ed8e9db201052378bf9d0d121e33 (diff)
downloadbcm5719-llvm-d2bbbabbfb93ab582477c24fea221862af1588a9.tar.gz
bcm5719-llvm-d2bbbabbfb93ab582477c24fea221862af1588a9.zip
simplify some code.
llvm-svn: 44655
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/InstructionCombining.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
index b1317502836..a868e56ca63 100644
--- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -6082,9 +6082,8 @@ Instruction *InstCombiner::FoldShiftByConstant(Value *Op0, ConstantInt *Op1,
// the constant which would cause it to be modified for this
// operation.
//
- if (isValid && !isLeftShift && I.getOpcode() == Instruction::AShr) {
+ if (isValid && I.getOpcode() == Instruction::AShr)
isValid = Op0C->getValue()[TypeBits-1] == highBitSet;
- }
if (isValid) {
Constant *NewRHS = ConstantExpr::get(I.getOpcode(), Op0C, Op1);
OpenPOWER on IntegriCloud