Skip to content

Commit

Permalink
OpaquePtr: use load instruction directly for type. NFC.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365768 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
TNorthover committed Jul 11, 2019
1 parent 4041c43 commit f132387
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/Transforms/Scalar/LICM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f132387

Please sign in to comment.