[llvm] LAA: improve code in getStrideFromPointer (NFC) (PR #124780)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 31 03:30:21 PST 2025


================
@@ -2859,26 +2859,23 @@ static Value *stripGetElementPtr(Value *Ptr, ScalarEvolution *SE, Loop *Lp) {
 /// strides "a[i*stride]". Returns the symbolic stride, or null otherwise.
 static const SCEV *getStrideFromPointer(Value *Ptr, ScalarEvolution *SE, Loop *Lp) {
   auto *PtrTy = dyn_cast<PointerType>(Ptr->getType());
-  if (!PtrTy || PtrTy->isAggregateType())
+  if (!PtrTy)
----------------
fhahn wrote:

(although even without opaque pointers, I think it could either have been a pointer or aggregate type)

https://github.com/llvm/llvm-project/pull/124780


More information about the llvm-commits mailing list