[clang] [CIR] Implement builtin extractf (PR #170427)
Henrich Lauko via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 2 23:43:23 PST 2025
================
@@ -266,6 +266,16 @@ class CIR_VectorTypeOf<list<Type> types, string summary = "">
"vector of " # CIR_TypeSummaries<types>.value,
summary)>;
+class CIR_VectorOf<Type T> : CIR_ConfinedType<
+ CIR_AnyVectorType,
+ [CIR_ElementTypePred<T.predicate>],
+ "CIR vector of " # T.summary>;
----------------
xlauko wrote:
```suggestion
// Element type constraint bases
class CIR_ElementTypePred<Pred pred> : SubstLeaves<"$_self",
"::mlir::cast<::cir::VectorType>($_self).getElementType()", pred>;
class CIR_VectorTypeOf<list<Type> types, string summary = "">
: CIR_ConfinedType<CIR_AnyVectorType,
[Or<!foreach(type, types, CIR_ElementTypePred<type.predicate>)>],
!if(!empty(summary),
"vector of " # CIR_TypeSummaries<types>.value,
summary)>;
```
https://github.com/llvm/llvm-project/pull/170427
More information about the cfe-commits
mailing list