Reviewed By: dcaballe, Dinistro
Differential Revision: https://reviews.llvm.org/D153750
// 2. the 'arm_za' function attribute is present and the first op in the
// function is an 'arm_sme::aarch64_sme_za_enable' intrinsic.
target.addDynamicallyLegalOp<func::FuncOp>([&](func::FuncOp funcOp) {
+ if (funcOp.isDeclaration())
+ return true;
auto firstOp = funcOp.getBody().front().begin();
return !funcOp->hasAttr("arm_za") ||
isa<arm_sme::aarch64_sme_za_enable>(firstOp);
// RUN: mlir-opt %s -enable-arm-streaming -convert-vector-to-llvm="enable-arm-sme" | FileCheck %s -check-prefix=DISABLE-ZA
// RUN: mlir-opt %s -convert-vector-to-llvm="enable-arm-sme" | FileCheck %s -check-prefix=NO-ARM-STREAMING
+// CHECK-LABEL: @declaration
+func.func private @declaration()
+
// CHECK-LABEL: @arm_za
func.func @arm_za() {
// ENABLE-ZA: arm_sme.intr.za.enable