// NOTE: File has been autogenerated by utils/aarch64_builtins_test_generator.py
// RUN: %clang_cc1 %s -fsyntax-only -triple aarch64-none-linux-gnu -target-feature +sme -target-feature +sme-b16b16 -target-feature +sme-mop4 -target-feature +sme2 -target-feature +sve -verify=streaming-guard

// REQUIRES: aarch64-registered-target

#include <arm_sme.h>

// Properties: guard="" streaming_guard="sme,sme2,sme-mop4,sme-b16b16" flags="streaming-only,requires-za"

void test(void) __arm_inout("za"){
  svbfloat16_t svbfloat16_t_val;
  svbfloat16x2_t svbfloat16x2_t_val;

  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmop4a_1x1_za16_bf16_bf16(1, svbfloat16_t_val, svbfloat16_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmop4a_1x2_za16_bf16_bf16(1, svbfloat16_t_val, svbfloat16x2_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmop4a_2x1_za16_bf16_bf16(1, svbfloat16x2_t_val, svbfloat16_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmop4a_2x2_za16_bf16_bf16(1, svbfloat16x2_t_val, svbfloat16x2_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmop4a_za16(1, svbfloat16_t_val, svbfloat16_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmop4a_za16(1, svbfloat16_t_val, svbfloat16x2_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmop4a_za16(1, svbfloat16x2_t_val, svbfloat16_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmop4a_za16(1, svbfloat16x2_t_val, svbfloat16x2_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmop4s_1x1_za16_bf16_bf16(1, svbfloat16_t_val, svbfloat16_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmop4s_1x2_za16_bf16_bf16(1, svbfloat16_t_val, svbfloat16x2_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmop4s_2x1_za16_bf16_bf16(1, svbfloat16x2_t_val, svbfloat16_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmop4s_2x2_za16_bf16_bf16(1, svbfloat16x2_t_val, svbfloat16x2_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmop4s_za16(1, svbfloat16_t_val, svbfloat16_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmop4s_za16(1, svbfloat16_t_val, svbfloat16x2_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmop4s_za16(1, svbfloat16x2_t_val, svbfloat16_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmop4s_za16(1, svbfloat16x2_t_val, svbfloat16x2_t_val);
}

void test_streaming(void) __arm_streaming __arm_inout("za"){
  svbfloat16_t svbfloat16_t_val;
  svbfloat16x2_t svbfloat16x2_t_val;

  svmop4a_1x1_za16_bf16_bf16(1, svbfloat16_t_val, svbfloat16_t_val);
  svmop4a_1x2_za16_bf16_bf16(1, svbfloat16_t_val, svbfloat16x2_t_val);
  svmop4a_2x1_za16_bf16_bf16(1, svbfloat16x2_t_val, svbfloat16_t_val);
  svmop4a_2x2_za16_bf16_bf16(1, svbfloat16x2_t_val, svbfloat16x2_t_val);
  svmop4a_za16(1, svbfloat16_t_val, svbfloat16_t_val);
  svmop4a_za16(1, svbfloat16_t_val, svbfloat16x2_t_val);
  svmop4a_za16(1, svbfloat16x2_t_val, svbfloat16_t_val);
  svmop4a_za16(1, svbfloat16x2_t_val, svbfloat16x2_t_val);
  svmop4s_1x1_za16_bf16_bf16(1, svbfloat16_t_val, svbfloat16_t_val);
  svmop4s_1x2_za16_bf16_bf16(1, svbfloat16_t_val, svbfloat16x2_t_val);
  svmop4s_2x1_za16_bf16_bf16(1, svbfloat16x2_t_val, svbfloat16_t_val);
  svmop4s_2x2_za16_bf16_bf16(1, svbfloat16x2_t_val, svbfloat16x2_t_val);
  svmop4s_za16(1, svbfloat16_t_val, svbfloat16_t_val);
  svmop4s_za16(1, svbfloat16_t_val, svbfloat16x2_t_val);
  svmop4s_za16(1, svbfloat16x2_t_val, svbfloat16_t_val);
  svmop4s_za16(1, svbfloat16x2_t_val, svbfloat16x2_t_val);
}

void test_streaming_compatible(void) __arm_streaming_compatible __arm_inout("za"){
  svbfloat16_t svbfloat16_t_val;
  svbfloat16x2_t svbfloat16x2_t_val;

  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmop4a_1x1_za16_bf16_bf16(1, svbfloat16_t_val, svbfloat16_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmop4a_1x2_za16_bf16_bf16(1, svbfloat16_t_val, svbfloat16x2_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmop4a_2x1_za16_bf16_bf16(1, svbfloat16x2_t_val, svbfloat16_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmop4a_2x2_za16_bf16_bf16(1, svbfloat16x2_t_val, svbfloat16x2_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmop4a_za16(1, svbfloat16_t_val, svbfloat16_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmop4a_za16(1, svbfloat16_t_val, svbfloat16x2_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmop4a_za16(1, svbfloat16x2_t_val, svbfloat16_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmop4a_za16(1, svbfloat16x2_t_val, svbfloat16x2_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmop4s_1x1_za16_bf16_bf16(1, svbfloat16_t_val, svbfloat16_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmop4s_1x2_za16_bf16_bf16(1, svbfloat16_t_val, svbfloat16x2_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmop4s_2x1_za16_bf16_bf16(1, svbfloat16x2_t_val, svbfloat16_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmop4s_2x2_za16_bf16_bf16(1, svbfloat16x2_t_val, svbfloat16x2_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmop4s_za16(1, svbfloat16_t_val, svbfloat16_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmop4s_za16(1, svbfloat16_t_val, svbfloat16x2_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmop4s_za16(1, svbfloat16x2_t_val, svbfloat16_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmop4s_za16(1, svbfloat16x2_t_val, svbfloat16x2_t_val);
}
