diff options
| author | Chris Lattner <sabre@nondot.org> | 2004-10-27 05:57:15 +0000 | 
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2004-10-27 05:57:15 +0000 | 
| commit | 70c2039b39506cc3277c909aeb2061bd95b0b2d0 (patch) | |
| tree | d28307ce03a415e11a3194172d06e24d864b8264 /llvm/lib/Transforms | |
| parent | c193790dbbcaf8a8b38e80c4dbcddc00c196e63a (diff) | |
| download | bcm5719-llvm-70c2039b39506cc3277c909aeb2061bd95b0b2d0.tar.gz bcm5719-llvm-70c2039b39506cc3277c909aeb2061bd95b0b2d0.zip | |
Hrm, this code was severely botched.  As it turns out, this patch:
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20041018/019708.html
exposed ANOTHER latent bug in this xform, which caused Prolangs-C/bison to fill
the zion nightly tester disk up and make the tester barf.
This is obviously not a good thing, so lets fix this bug shall we? :)
llvm-svn: 17276
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 4 | 
1 files changed, 4 insertions, 0 deletions
| diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index 61acad04f32..f8f0573395d 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp @@ -1294,6 +1294,10 @@ Instruction *InstCombiner::OptAndOp(Instruction *Op,            ShVal = InsertNewInstBefore(new ShiftInst(Instruction::Shr, ShVal,                                                      OpRHS, Op->getName()),                                        TheAnd); +          Value *AndRHS2 = ConstantExpr::getCast(AndRHS, ShVal->getType()); +          ShVal = InsertNewInstBefore(BinaryOperator::createAnd(ShVal, AndRHS2, +                                                             TheAnd.getName()), +                                      TheAnd);            return new CastInst(ShVal, Op->getType());          }        } | 

