summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/InstCombine
diff options
context:
space:
mode:
authorJakub Staszak <kubastaszak@gmail.com>2013-06-06 00:49:57 +0000
committerJakub Staszak <kubastaszak@gmail.com>2013-06-06 00:49:57 +0000
commit9de494e0ee1fe492a172443fc9b450fd77fb6e77 (patch)
tree88bf62e2fc56218399970717fbfc4111743a98d5 /llvm/lib/Transforms/InstCombine
parent81f83ad93d57934f5c20902616cf000d616855fe (diff)
downloadbcm5719-llvm-9de494e0ee1fe492a172443fc9b450fd77fb6e77.tar.gz
bcm5719-llvm-9de494e0ee1fe492a172443fc9b450fd77fb6e77.zip
Remove unneeded cast<>.
llvm-svn: 183363
Diffstat (limited to 'llvm/lib/Transforms/InstCombine')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp b/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
index aed9054f4e6..496fce65e0b 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
+++ b/llvm/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) {
OpenPOWER on IntegriCloud