diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2013-09-06 00:37:24 +0000 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2013-09-06 00:37:24 +0000 |
commit | 4598bd53ab89c3d120ad8249abbfdc7e2d64d291 (patch) | |
tree | f9e741e33a79b03ecd1d3961f531018ce421ed66 /lib/Transforms/Scalar/CodeGenPrepare.cpp | |
parent | ce8e4647bf4fff92bf5855b494461a039200b418 (diff) | |
download | llvm-4598bd53ab89c3d120ad8249abbfdc7e2d64d291.tar.gz llvm-4598bd53ab89c3d120ad8249abbfdc7e2d64d291.tar.bz2 llvm-4598bd53ab89c3d120ad8249abbfdc7e2d64d291.tar.xz |
Use type helper functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190113 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/CodeGenPrepare.cpp')
-rw-r--r-- | lib/Transforms/Scalar/CodeGenPrepare.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/CodeGenPrepare.cpp b/lib/Transforms/Scalar/CodeGenPrepare.cpp index 67bf1bbcbf..c1a83bf478 100644 --- a/lib/Transforms/Scalar/CodeGenPrepare.cpp +++ b/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 |