[llvm] [AMDGPU] Extended vector promotion to aggregate types. (PR #143784)
Shilei Tian via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 11 14:14:18 PDT 2025
================
@@ -818,6 +818,28 @@ static BasicBlock::iterator skipToNonAllocaInsertPt(BasicBlock &BB,
return I;
}
+/// Get the underlying type of a homogeneous aggregate type, or nullptr if the
+/// type is non-homogeneous.
+static Type *getHomogeneousType(Type *Ty) {
+ if (auto *VectorTy = dyn_cast<FixedVectorType>(Ty))
+ return VectorTy->getElementType();
+ if (auto *ArrayTy = dyn_cast<ArrayType>(Ty))
+ return getHomogeneousType(ArrayTy->getElementType());
----------------
shiltian wrote:
use a work list instead of recursion pls
https://github.com/llvm/llvm-project/pull/143784
More information about the llvm-commits
mailing list