diff options
author | Tim Northover <tnorthover@apple.com> | 2019-07-11 13:12:08 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2019-07-11 13:12:08 +0000 |
commit | 27658ed512c449db7dafcc422a674140c3851772 (patch) | |
tree | 102d1a495400a7d800d0833bb051c31510cefc36 | |
parent | 030bb3d363733c88947cb2551fe663af67c053e7 (diff) | |
download | bcm5719-llvm-27658ed512c449db7dafcc422a674140c3851772.tar.gz bcm5719-llvm-27658ed512c449db7dafcc422a674140c3851772.zip |
OpaquePtr: use load instruction directly for type. NFC.
llvm-svn: 365768
-rw-r--r-- | llvm/lib/Transforms/Scalar/LICM.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/LICM.cpp b/llvm/lib/Transforms/Scalar/LICM.cpp index 3c5e773f793..d9dda4cef2d 100644 --- a/llvm/lib/Transforms/Scalar/LICM.cpp +++ b/llvm/lib/Transforms/Scalar/LICM.cpp @@ -975,8 +975,7 @@ static bool isLoadInvariantInLoop(LoadInst *LI, DominatorTree *DT, Loop *CurLoop) { Value *Addr = LI->getOperand(0); const DataLayout &DL = LI->getModule()->getDataLayout(); - const uint32_t LocSizeInBits = DL.getTypeSizeInBits( - cast<PointerType>(Addr->getType())->getElementType()); + const uint32_t LocSizeInBits = DL.getTypeSizeInBits(LI->getType()); // if the type is i8 addrspace(x)*, we know this is the type of // llvm.invariant.start operand |