[llvm] [LLVM][IR] Support target extension types in vectors (PR #140630)

Paul Walker via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 9 05:03:38 PDT 2025


================
@@ -968,7 +973,10 @@ struct TargetTypeInfo {
 
   template <typename... ArgTys>
   TargetTypeInfo(Type *LayoutType, ArgTys... Properties)
-      : LayoutType(LayoutType), Properties((0 | ... | Properties)) {}
+      : LayoutType(LayoutType), Properties((0 | ... | Properties)) {
+    if (this->Properties & TargetExtType::CanBeVectorElement)
+      assert(LayoutType->isSized() && "Vector element type must be sized");
----------------
paulwalker-arm wrote:

Perhaps?
```suggestion
    assert((!(this->Properties & TargetExtType::CanBeVectorElement) || LayoutType->isSized()) && "Vector element type must be sized");
```

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


More information about the llvm-commits mailing list