summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2013-09-03 21:05:15 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2013-09-03 21:05:15 +0000
commite38e4cdc468383013f842bd05181f869b89af6e5 (patch)
tree66be0ca969bc299d03e933544630b03fcd24cbbd
parentee6aa0c62e8b9bc7fc63efe0abf78f0918d12808 (diff)
downloadbcm5719-llvm-e38e4cdc468383013f842bd05181f869b89af6e5.tar.gz
bcm5719-llvm-e38e4cdc468383013f842bd05181f869b89af6e5.zip
Use type form of getIntPtrType in alloca visitor.
This doesn't actually matter, since alloca is always 0 address space, but this is more consistent. llvm-svn: 189853
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp b/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
index 58c61e7de9f..4c382a366d6 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
@@ -154,7 +154,7 @@ Instruction *InstCombiner::visitAllocaInst(AllocaInst &AI) {
// Ensure that the alloca array size argument has type intptr_t, so that
// any casting is exposed early.
if (TD) {
- Type *IntPtrTy = TD->getIntPtrType(AI.getContext());
+ Type *IntPtrTy = TD->getIntPtrType(AI.getType());
if (AI.getArraySize()->getType() != IntPtrTy) {
Value *V = Builder->CreateIntCast(AI.getArraySize(),
IntPtrTy, false);
@@ -181,7 +181,7 @@ Instruction *InstCombiner::visitAllocaInst(AllocaInst &AI) {
// insert our getelementptr instruction...
//
Type *IdxTy = TD
- ? TD->getIntPtrType(AI.getContext())
+ ? TD->getIntPtrType(AI.getType())
: Type::getInt64Ty(AI.getContext());
Value *NullIdx = Constant::getNullValue(IdxTy);
Value *Idx[2] = { NullIdx, NullIdx };
OpenPOWER on IntegriCloud