================
@@ -188,6 +188,20 @@ BitIntSpecAttr::verify(function_ref<InFlightDiagnostic()>
emitError,
return success();
}
+//===----------------------------------------------------------------------===//
+// VectorSpecAttr definitions
+//===----------------------------------------------------------------------===//
+
+LogicalResult
+VectorSpecAttr::verify(function_ref<InFlightDiagnostic()> emitError,
+ uint32_t maxAlign) {
+ // TargetInfo::getMaxVectorAlign() is a power of two, at least the char
+ // width, when the target imposes a cap. Char width is 8 bits.
+ if (maxAlign < 8 || !llvm::isPowerOf2_32(maxAlign))
----------------
erichkeane wrote:
I wonder if we should start having one of those `builtin` verifiers for this?
I think this is the 2nd time I've seen this same constraint.
https://github.com/llvm/llvm-project/pull/242040
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits