summaryrefslogtreecommitdiff
path: root/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
diff options
context:
space:
mode:
authorJay Foad <jay.foad@gmail.com>2011-07-12 14:06:48 +0000
committerJay Foad <jay.foad@gmail.com>2011-07-12 14:06:48 +0000
commit5fdd6c8793462549e3593890ec61573da06e3346 (patch)
tree895067e740b3c6f2f97805443c61195cf8de169a /lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
parentd475c105080cc5082ca8b8e87c89fa7c2dade39e (diff)
downloadllvm-5fdd6c8793462549e3593890ec61573da06e3346.tar.gz
llvm-5fdd6c8793462549e3593890ec61573da06e3346.tar.bz2
llvm-5fdd6c8793462549e3593890ec61573da06e3346.tar.xz
Second attempt at de-constifying LLVM Types in FunctionType::get(),
StructType::get() and TargetData::getIntPtrType(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134982 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/InstCombine/InstCombineAndOrXor.cpp')
-rw-r--r--lib/Transforms/InstCombine/InstCombineAndOrXor.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp b/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
index a08446e5d5..1dfbd3e548 100644
--- a/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
+++ b/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
@@ -1400,7 +1400,7 @@ static bool CollectBSwapParts(Value *V, int OverallLeftShift, uint32_t ByteMask,
/// MatchBSwap - Given an OR instruction, check to see if this is a bswap idiom.
/// If so, insert the new bswap intrinsic and return it.
Instruction *InstCombiner::MatchBSwap(BinaryOperator &I) {
- const IntegerType *ITy = dyn_cast<IntegerType>(I.getType());
+ IntegerType *ITy = dyn_cast<IntegerType>(I.getType());
if (!ITy || ITy->getBitWidth() % 16 ||
// ByteMask only allows up to 32-byte values.
ITy->getBitWidth() > 32*8)
@@ -1424,7 +1424,7 @@ Instruction *InstCombiner::MatchBSwap(BinaryOperator &I) {
for (unsigned i = 1, e = ByteValues.size(); i != e; ++i)
if (ByteValues[i] != V)
return 0;
- const Type *Tys[] = { ITy };
+ Type *Tys[] = { ITy };
Module *M = I.getParent()->getParent()->getParent();
Function *F = Intrinsic::getDeclaration(M, Intrinsic::bswap, Tys, 1);
return CallInst::Create(F, V);