// 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-f16f16 -target-feature +sve -verify=streaming-guard

// REQUIRES: aarch64-registered-target

#include <arm_sme.h>

// Properties: guard="" streaming_guard="sme,sme-f16f16" flags="streaming-only,requires-za"

void test(void) __arm_inout("za"){
  svbool_t svbool_t_val;
  svfloat16_t svfloat16_t_val;
  svfloat16x2_t svfloat16x2_t_val;
  svfloat16x4_t svfloat16x4_t_val;
  uint32_t uint32_t_val;

  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmla_lane_za16_f16_vg1x2(uint32_t_val, svfloat16x2_t_val, svfloat16_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmla_lane_za16_f16_vg1x4(uint32_t_val, svfloat16x4_t_val, svfloat16_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmla_lane_za16_vg1x2(uint32_t_val, svfloat16x2_t_val, svfloat16_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmla_lane_za16_vg1x4(uint32_t_val, svfloat16x4_t_val, svfloat16_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmla_single_za16_f16_vg1x2(uint32_t_val, svfloat16x2_t_val, svfloat16_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmla_single_za16_f16_vg1x4(uint32_t_val, svfloat16x4_t_val, svfloat16_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmla_za16_f16_vg1x2(uint32_t_val, svfloat16x2_t_val, svfloat16x2_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmla_za16_f16_vg1x4(uint32_t_val, svfloat16x4_t_val, svfloat16x4_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmla_za16_vg1x2(uint32_t_val, svfloat16x2_t_val, svfloat16_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmla_za16_vg1x2(uint32_t_val, svfloat16x2_t_val, svfloat16x2_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmla_za16_vg1x4(uint32_t_val, svfloat16x4_t_val, svfloat16_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmla_za16_vg1x4(uint32_t_val, svfloat16x4_t_val, svfloat16x4_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmls_lane_za16_f16_vg1x2(uint32_t_val, svfloat16x2_t_val, svfloat16_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmls_lane_za16_f16_vg1x4(uint32_t_val, svfloat16x4_t_val, svfloat16_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmls_lane_za16_vg1x2(uint32_t_val, svfloat16x2_t_val, svfloat16_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmls_lane_za16_vg1x4(uint32_t_val, svfloat16x4_t_val, svfloat16_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmls_single_za16_f16_vg1x2(uint32_t_val, svfloat16x2_t_val, svfloat16_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmls_single_za16_f16_vg1x4(uint32_t_val, svfloat16x4_t_val, svfloat16_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmls_za16_f16_vg1x2(uint32_t_val, svfloat16x2_t_val, svfloat16x2_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmls_za16_f16_vg1x4(uint32_t_val, svfloat16x4_t_val, svfloat16x4_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmls_za16_vg1x2(uint32_t_val, svfloat16x2_t_val, svfloat16_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmls_za16_vg1x2(uint32_t_val, svfloat16x2_t_val, svfloat16x2_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmls_za16_vg1x4(uint32_t_val, svfloat16x4_t_val, svfloat16_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmls_za16_vg1x4(uint32_t_val, svfloat16x4_t_val, svfloat16x4_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmopa_za16_f16_m(1, svbool_t_val, svbool_t_val, svfloat16_t_val, svfloat16_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmopa_za16_m(1, svbool_t_val, svbool_t_val, svfloat16_t_val, svfloat16_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmops_za16_f16_m(1, svbool_t_val, svbool_t_val, svfloat16_t_val, svfloat16_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmops_za16_m(1, svbool_t_val, svbool_t_val, svfloat16_t_val, svfloat16_t_val);
}

void test_streaming(void) __arm_streaming __arm_inout("za"){
  svbool_t svbool_t_val;
  svfloat16_t svfloat16_t_val;
  svfloat16x2_t svfloat16x2_t_val;
  svfloat16x4_t svfloat16x4_t_val;
  uint32_t uint32_t_val;

  svmla_lane_za16_f16_vg1x2(uint32_t_val, svfloat16x2_t_val, svfloat16_t_val, 2);
  svmla_lane_za16_f16_vg1x4(uint32_t_val, svfloat16x4_t_val, svfloat16_t_val, 2);
  svmla_lane_za16_vg1x2(uint32_t_val, svfloat16x2_t_val, svfloat16_t_val, 2);
  svmla_lane_za16_vg1x4(uint32_t_val, svfloat16x4_t_val, svfloat16_t_val, 2);
  svmla_single_za16_f16_vg1x2(uint32_t_val, svfloat16x2_t_val, svfloat16_t_val);
  svmla_single_za16_f16_vg1x4(uint32_t_val, svfloat16x4_t_val, svfloat16_t_val);
  svmla_za16_f16_vg1x2(uint32_t_val, svfloat16x2_t_val, svfloat16x2_t_val);
  svmla_za16_f16_vg1x4(uint32_t_val, svfloat16x4_t_val, svfloat16x4_t_val);
  svmla_za16_vg1x2(uint32_t_val, svfloat16x2_t_val, svfloat16_t_val);
  svmla_za16_vg1x2(uint32_t_val, svfloat16x2_t_val, svfloat16x2_t_val);
  svmla_za16_vg1x4(uint32_t_val, svfloat16x4_t_val, svfloat16_t_val);
  svmla_za16_vg1x4(uint32_t_val, svfloat16x4_t_val, svfloat16x4_t_val);
  svmls_lane_za16_f16_vg1x2(uint32_t_val, svfloat16x2_t_val, svfloat16_t_val, 2);
  svmls_lane_za16_f16_vg1x4(uint32_t_val, svfloat16x4_t_val, svfloat16_t_val, 2);
  svmls_lane_za16_vg1x2(uint32_t_val, svfloat16x2_t_val, svfloat16_t_val, 2);
  svmls_lane_za16_vg1x4(uint32_t_val, svfloat16x4_t_val, svfloat16_t_val, 2);
  svmls_single_za16_f16_vg1x2(uint32_t_val, svfloat16x2_t_val, svfloat16_t_val);
  svmls_single_za16_f16_vg1x4(uint32_t_val, svfloat16x4_t_val, svfloat16_t_val);
  svmls_za16_f16_vg1x2(uint32_t_val, svfloat16x2_t_val, svfloat16x2_t_val);
  svmls_za16_f16_vg1x4(uint32_t_val, svfloat16x4_t_val, svfloat16x4_t_val);
  svmls_za16_vg1x2(uint32_t_val, svfloat16x2_t_val, svfloat16_t_val);
  svmls_za16_vg1x2(uint32_t_val, svfloat16x2_t_val, svfloat16x2_t_val);
  svmls_za16_vg1x4(uint32_t_val, svfloat16x4_t_val, svfloat16_t_val);
  svmls_za16_vg1x4(uint32_t_val, svfloat16x4_t_val, svfloat16x4_t_val);
  svmopa_za16_f16_m(1, svbool_t_val, svbool_t_val, svfloat16_t_val, svfloat16_t_val);
  svmopa_za16_m(1, svbool_t_val, svbool_t_val, svfloat16_t_val, svfloat16_t_val);
  svmops_za16_f16_m(1, svbool_t_val, svbool_t_val, svfloat16_t_val, svfloat16_t_val);
  svmops_za16_m(1, svbool_t_val, svbool_t_val, svfloat16_t_val, svfloat16_t_val);
}

void test_streaming_compatible(void) __arm_streaming_compatible __arm_inout("za"){
  svbool_t svbool_t_val;
  svfloat16_t svfloat16_t_val;
  svfloat16x2_t svfloat16x2_t_val;
  svfloat16x4_t svfloat16x4_t_val;
  uint32_t uint32_t_val;

  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmla_lane_za16_f16_vg1x2(uint32_t_val, svfloat16x2_t_val, svfloat16_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmla_lane_za16_f16_vg1x4(uint32_t_val, svfloat16x4_t_val, svfloat16_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmla_lane_za16_vg1x2(uint32_t_val, svfloat16x2_t_val, svfloat16_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmla_lane_za16_vg1x4(uint32_t_val, svfloat16x4_t_val, svfloat16_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmla_single_za16_f16_vg1x2(uint32_t_val, svfloat16x2_t_val, svfloat16_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmla_single_za16_f16_vg1x4(uint32_t_val, svfloat16x4_t_val, svfloat16_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmla_za16_f16_vg1x2(uint32_t_val, svfloat16x2_t_val, svfloat16x2_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmla_za16_f16_vg1x4(uint32_t_val, svfloat16x4_t_val, svfloat16x4_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmla_za16_vg1x2(uint32_t_val, svfloat16x2_t_val, svfloat16_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmla_za16_vg1x2(uint32_t_val, svfloat16x2_t_val, svfloat16x2_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmla_za16_vg1x4(uint32_t_val, svfloat16x4_t_val, svfloat16_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmla_za16_vg1x4(uint32_t_val, svfloat16x4_t_val, svfloat16x4_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmls_lane_za16_f16_vg1x2(uint32_t_val, svfloat16x2_t_val, svfloat16_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmls_lane_za16_f16_vg1x4(uint32_t_val, svfloat16x4_t_val, svfloat16_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmls_lane_za16_vg1x2(uint32_t_val, svfloat16x2_t_val, svfloat16_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmls_lane_za16_vg1x4(uint32_t_val, svfloat16x4_t_val, svfloat16_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmls_single_za16_f16_vg1x2(uint32_t_val, svfloat16x2_t_val, svfloat16_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmls_single_za16_f16_vg1x4(uint32_t_val, svfloat16x4_t_val, svfloat16_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmls_za16_f16_vg1x2(uint32_t_val, svfloat16x2_t_val, svfloat16x2_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmls_za16_f16_vg1x4(uint32_t_val, svfloat16x4_t_val, svfloat16x4_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmls_za16_vg1x2(uint32_t_val, svfloat16x2_t_val, svfloat16_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmls_za16_vg1x2(uint32_t_val, svfloat16x2_t_val, svfloat16x2_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmls_za16_vg1x4(uint32_t_val, svfloat16x4_t_val, svfloat16_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmls_za16_vg1x4(uint32_t_val, svfloat16x4_t_val, svfloat16x4_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmopa_za16_f16_m(1, svbool_t_val, svbool_t_val, svfloat16_t_val, svfloat16_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmopa_za16_m(1, svbool_t_val, svbool_t_val, svfloat16_t_val, svfloat16_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmops_za16_f16_m(1, svbool_t_val, svbool_t_val, svfloat16_t_val, svfloat16_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svmops_za16_m(1, svbool_t_val, svbool_t_val, svfloat16_t_val, svfloat16_t_val);
}
