summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2013-09-06 00:37:24 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2013-09-06 00:37:24 +0000
commit8227b9f69c4e1ff8d05fabe08e62f3c91ee42ade (patch)
treeeb86a5b1a0b152ec121a7ecce0945b6cd05767c3 /llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp
parent37d42ecafff736cc83f3a3eaa0ecd7c56eaa1bc6 (diff)
downloadbcm5719-llvm-8227b9f69c4e1ff8d05fabe08e62f3c91ee42ade.tar.gz
bcm5719-llvm-8227b9f69c4e1ff8d05fabe08e62f3c91ee42ade.zip
Use type helper functions.
llvm-svn: 190113
Diffstat (limited to 'llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp b/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp
index 67bf1bbcbf2..c1a83bf478e 100644
--- a/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp
+++ b/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp
@@ -1418,8 +1418,7 @@ IsProfitableToFoldIntoAddressingMode(Instruction *I, ExtAddrMode &AMBefore,
Value *Address = User->getOperand(OpNo);
if (!Address->getType()->isPointerTy())
return false;
- Type *AddressAccessTy =
- cast<PointerType>(Address->getType())->getElementType();
+ Type *AddressAccessTy = Address->getType()->getPointerElementType();
// Do a match against the root of this address, ignoring profitability. This
// will tell us if the addressing mode for the memory operation will
OpenPOWER on IntegriCloud