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

// REQUIRES: aarch64-registered-target

#include <arm_sme.h>

// Properties: guard="" streaming_guard="sme,sme2" flags="streaming-only,requires-zt"

void test(void) __arm_inout("zt0"){
  svuint8_t svuint8_t_val;

  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_bf16(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_bf16_x2(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_bf16_x4(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_f16(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_f16_x2(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_f16_x4(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_f32(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_f32_x2(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_f32_x4(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_mf8(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_mf8_x2(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_mf8_x4(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_s8(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_s8_x2(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_s8_x4(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_s16(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_s16_x2(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_s16_x4(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_s32(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_s32_x2(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_s32_x4(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_u8(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_u8_x2(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_u8_x4(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_u16(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_u16_x2(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_u16_x4(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_u32(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_u32_x2(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_u32_x4(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_bf16(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_bf16_x2(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_bf16_x4(0, svuint8_t_val, 1);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_f16(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_f16_x2(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_f16_x4(0, svuint8_t_val, 1);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_f32(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_f32_x2(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_f32_x4(0, svuint8_t_val, 1);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_mf8(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_mf8_x2(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_s8(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_s8_x2(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_s16(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_s16_x2(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_s16_x4(0, svuint8_t_val, 1);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_s32(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_s32_x2(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_s32_x4(0, svuint8_t_val, 1);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_u8(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_u8_x2(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_u16(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_u16_x2(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_u16_x4(0, svuint8_t_val, 1);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_u32(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_u32_x2(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_u32_x4(0, svuint8_t_val, 1);
}

void test_streaming(void) __arm_streaming __arm_inout("zt0"){
  svuint8_t svuint8_t_val;

  svluti2_lane_zt_bf16(0, svuint8_t_val, 2);
  svluti2_lane_zt_bf16_x2(0, svuint8_t_val, 2);
  svluti2_lane_zt_bf16_x4(0, svuint8_t_val, 2);
  svluti2_lane_zt_f16(0, svuint8_t_val, 2);
  svluti2_lane_zt_f16_x2(0, svuint8_t_val, 2);
  svluti2_lane_zt_f16_x4(0, svuint8_t_val, 2);
  svluti2_lane_zt_f32(0, svuint8_t_val, 2);
  svluti2_lane_zt_f32_x2(0, svuint8_t_val, 2);
  svluti2_lane_zt_f32_x4(0, svuint8_t_val, 2);
  svluti2_lane_zt_mf8(0, svuint8_t_val, 2);
  svluti2_lane_zt_mf8_x2(0, svuint8_t_val, 2);
  svluti2_lane_zt_mf8_x4(0, svuint8_t_val, 2);
  svluti2_lane_zt_s8(0, svuint8_t_val, 2);
  svluti2_lane_zt_s8_x2(0, svuint8_t_val, 2);
  svluti2_lane_zt_s8_x4(0, svuint8_t_val, 2);
  svluti2_lane_zt_s16(0, svuint8_t_val, 2);
  svluti2_lane_zt_s16_x2(0, svuint8_t_val, 2);
  svluti2_lane_zt_s16_x4(0, svuint8_t_val, 2);
  svluti2_lane_zt_s32(0, svuint8_t_val, 2);
  svluti2_lane_zt_s32_x2(0, svuint8_t_val, 2);
  svluti2_lane_zt_s32_x4(0, svuint8_t_val, 2);
  svluti2_lane_zt_u8(0, svuint8_t_val, 2);
  svluti2_lane_zt_u8_x2(0, svuint8_t_val, 2);
  svluti2_lane_zt_u8_x4(0, svuint8_t_val, 2);
  svluti2_lane_zt_u16(0, svuint8_t_val, 2);
  svluti2_lane_zt_u16_x2(0, svuint8_t_val, 2);
  svluti2_lane_zt_u16_x4(0, svuint8_t_val, 2);
  svluti2_lane_zt_u32(0, svuint8_t_val, 2);
  svluti2_lane_zt_u32_x2(0, svuint8_t_val, 2);
  svluti2_lane_zt_u32_x4(0, svuint8_t_val, 2);
  svluti4_lane_zt_bf16(0, svuint8_t_val, 2);
  svluti4_lane_zt_bf16_x2(0, svuint8_t_val, 2);
  svluti4_lane_zt_bf16_x4(0, svuint8_t_val, 1);
  svluti4_lane_zt_f16(0, svuint8_t_val, 2);
  svluti4_lane_zt_f16_x2(0, svuint8_t_val, 2);
  svluti4_lane_zt_f16_x4(0, svuint8_t_val, 1);
  svluti4_lane_zt_f32(0, svuint8_t_val, 2);
  svluti4_lane_zt_f32_x2(0, svuint8_t_val, 2);
  svluti4_lane_zt_f32_x4(0, svuint8_t_val, 1);
  svluti4_lane_zt_mf8(0, svuint8_t_val, 2);
  svluti4_lane_zt_mf8_x2(0, svuint8_t_val, 2);
  svluti4_lane_zt_s8(0, svuint8_t_val, 2);
  svluti4_lane_zt_s8_x2(0, svuint8_t_val, 2);
  svluti4_lane_zt_s16(0, svuint8_t_val, 2);
  svluti4_lane_zt_s16_x2(0, svuint8_t_val, 2);
  svluti4_lane_zt_s16_x4(0, svuint8_t_val, 1);
  svluti4_lane_zt_s32(0, svuint8_t_val, 2);
  svluti4_lane_zt_s32_x2(0, svuint8_t_val, 2);
  svluti4_lane_zt_s32_x4(0, svuint8_t_val, 1);
  svluti4_lane_zt_u8(0, svuint8_t_val, 2);
  svluti4_lane_zt_u8_x2(0, svuint8_t_val, 2);
  svluti4_lane_zt_u16(0, svuint8_t_val, 2);
  svluti4_lane_zt_u16_x2(0, svuint8_t_val, 2);
  svluti4_lane_zt_u16_x4(0, svuint8_t_val, 1);
  svluti4_lane_zt_u32(0, svuint8_t_val, 2);
  svluti4_lane_zt_u32_x2(0, svuint8_t_val, 2);
  svluti4_lane_zt_u32_x4(0, svuint8_t_val, 1);
}

void test_streaming_compatible(void) __arm_streaming_compatible __arm_inout("zt0"){
  svuint8_t svuint8_t_val;

  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_bf16(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_bf16_x2(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_bf16_x4(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_f16(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_f16_x2(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_f16_x4(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_f32(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_f32_x2(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_f32_x4(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_mf8(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_mf8_x2(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_mf8_x4(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_s8(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_s8_x2(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_s8_x4(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_s16(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_s16_x2(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_s16_x4(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_s32(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_s32_x2(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_s32_x4(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_u8(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_u8_x2(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_u8_x4(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_u16(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_u16_x2(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_u16_x4(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_u32(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_u32_x2(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti2_lane_zt_u32_x4(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_bf16(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_bf16_x2(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_bf16_x4(0, svuint8_t_val, 1);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_f16(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_f16_x2(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_f16_x4(0, svuint8_t_val, 1);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_f32(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_f32_x2(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_f32_x4(0, svuint8_t_val, 1);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_mf8(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_mf8_x2(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_s8(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_s8_x2(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_s16(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_s16_x2(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_s16_x4(0, svuint8_t_val, 1);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_s32(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_s32_x2(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_s32_x4(0, svuint8_t_val, 1);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_u8(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_u8_x2(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_u16(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_u16_x2(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_u16_x4(0, svuint8_t_val, 1);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_u32(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_u32_x2(0, svuint8_t_val, 2);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svluti4_lane_zt_u32_x4(0, svuint8_t_val, 1);
}
