[llvm] 113a807 - [OpaquePtr] Get load/store type without PointerType::getElementType()
Arthur Eubanks via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 13 09:34:46 PDT 2021
Author: Arthur Eubanks
Date: 2021-07-13T09:34:34-07:00
New Revision: 113a80797731b1d7cb20d8b42238908efc9e4f48
URL: https://github.com/llvm/llvm-project/commit/113a80797731b1d7cb20d8b42238908efc9e4f48
DIFF: https://github.com/llvm/llvm-project/commit/113a80797731b1d7cb20d8b42238908efc9e4f48.diff
LOG: [OpaquePtr] Get load/store type without PointerType::getElementType()
Added:
Modified:
llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp b/llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp
index e7b5a264e8b1e..f1a2e7fd2b17d 100644
--- a/llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp
@@ -100,11 +100,11 @@ struct StoreToLoadForwardingCandidate {
Value *LoadPtr = Load->getPointerOperand();
Value *StorePtr = Store->getPointerOperand();
Type *LoadPtrType = LoadPtr->getType();
- Type *LoadType = LoadPtrType->getPointerElementType();
+ Type *LoadType = getLoadStoreType(Load);
assert(LoadPtrType->getPointerAddressSpace() ==
StorePtr->getType()->getPointerAddressSpace() &&
- LoadType == StorePtr->getType()->getPointerElementType() &&
+ LoadType == getLoadStoreType(Store) &&
"Should be a known dependence");
// Currently we only support accesses with unit stride. FIXME: we should be
More information about the llvm-commits
mailing list