diff options
author | Jakub Staszak <kubastaszak@gmail.com> | 2013-06-06 00:49:57 +0000 |
---|---|---|
committer | Jakub Staszak <kubastaszak@gmail.com> | 2013-06-06 00:49:57 +0000 |
commit | c6e2ab3a573af4d3b486eb9164cce8e6760ef8dd (patch) | |
tree | 41bff6ff3f9ba339ae3342f974266a39ffd099bf /lib/Transforms/InstCombine | |
parent | 272d881234dac8d51bccf90d52550ee4da888c94 (diff) | |
download | external_llvm-c6e2ab3a573af4d3b486eb9164cce8e6760ef8dd.zip external_llvm-c6e2ab3a573af4d3b486eb9164cce8e6760ef8dd.tar.gz external_llvm-c6e2ab3a573af4d3b486eb9164cce8e6760ef8dd.tar.bz2 |
Remove unneeded cast<>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183363 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/InstCombine')
-rw-r--r-- | lib/Transforms/InstCombine/InstCombineAndOrXor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp b/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp index aed9054..496fce6 100644 --- a/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp +++ b/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp @@ -173,14 +173,14 @@ Instruction *InstCombiner::OptAndOp(Instruction *Op, // Adding a one to a single bit bit-field should be turned into an XOR // of the bit. First thing to check is to see if this AND is with a // single bit constant. - const APInt &AndRHSV = cast<ConstantInt>(AndRHS)->getValue(); + const APInt &AndRHSV = AndRHS->getValue(); // If there is only one bit set. if (AndRHSV.isPowerOf2()) { // Ok, at this point, we know that we are masking the result of the // ADD down to exactly one bit. If the constant we are adding has // no bits set below this bit, then we can eliminate the ADD. - const APInt& AddRHS = cast<ConstantInt>(OpRHS)->getValue(); + const APInt& AddRHS = OpRHS->getValue(); // Check to see if any bits below the one bit set in AndRHSV are set. if ((AddRHS & (AndRHSV-1)) == 0) { |