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

// REQUIRES: aarch64-registered-target

#include <arm_sve.h>

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

void test(void) {
  svfloat16x2_t svfloat16x2_t_val;
  svfloat16x4_t svfloat16x4_t_val;
  svfloat32x2_t svfloat32x2_t_val;
  svfloat32x4_t svfloat32x4_t_val;
  svfloat64x2_t svfloat64x2_t_val;
  svfloat64x4_t svfloat64x4_t_val;

  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svamax(svfloat16x2_t_val, svfloat16x2_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svamax(svfloat16x4_t_val, svfloat16x4_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svamax(svfloat32x2_t_val, svfloat32x2_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svamax(svfloat32x4_t_val, svfloat32x4_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svamax(svfloat64x2_t_val, svfloat64x2_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svamax(svfloat64x4_t_val, svfloat64x4_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svamax_f16_x2(svfloat16x2_t_val, svfloat16x2_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svamax_f16_x4(svfloat16x4_t_val, svfloat16x4_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svamax_f32_x2(svfloat32x2_t_val, svfloat32x2_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svamax_f32_x4(svfloat32x4_t_val, svfloat32x4_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svamax_f64_x2(svfloat64x2_t_val, svfloat64x2_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svamax_f64_x4(svfloat64x4_t_val, svfloat64x4_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svamin(svfloat16x2_t_val, svfloat16x2_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svamin(svfloat16x4_t_val, svfloat16x4_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svamin(svfloat32x2_t_val, svfloat32x2_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svamin(svfloat32x4_t_val, svfloat32x4_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svamin(svfloat64x2_t_val, svfloat64x2_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svamin(svfloat64x4_t_val, svfloat64x4_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svamin_f16_x2(svfloat16x2_t_val, svfloat16x2_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svamin_f16_x4(svfloat16x4_t_val, svfloat16x4_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svamin_f32_x2(svfloat32x2_t_val, svfloat32x2_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svamin_f32_x4(svfloat32x4_t_val, svfloat32x4_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svamin_f64_x2(svfloat64x2_t_val, svfloat64x2_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svamin_f64_x4(svfloat64x4_t_val, svfloat64x4_t_val);
}

void test_streaming(void) __arm_streaming{
  svfloat16x2_t svfloat16x2_t_val;
  svfloat16x4_t svfloat16x4_t_val;
  svfloat32x2_t svfloat32x2_t_val;
  svfloat32x4_t svfloat32x4_t_val;
  svfloat64x2_t svfloat64x2_t_val;
  svfloat64x4_t svfloat64x4_t_val;

  svamax(svfloat16x2_t_val, svfloat16x2_t_val);
  svamax(svfloat16x4_t_val, svfloat16x4_t_val);
  svamax(svfloat32x2_t_val, svfloat32x2_t_val);
  svamax(svfloat32x4_t_val, svfloat32x4_t_val);
  svamax(svfloat64x2_t_val, svfloat64x2_t_val);
  svamax(svfloat64x4_t_val, svfloat64x4_t_val);
  svamax_f16_x2(svfloat16x2_t_val, svfloat16x2_t_val);
  svamax_f16_x4(svfloat16x4_t_val, svfloat16x4_t_val);
  svamax_f32_x2(svfloat32x2_t_val, svfloat32x2_t_val);
  svamax_f32_x4(svfloat32x4_t_val, svfloat32x4_t_val);
  svamax_f64_x2(svfloat64x2_t_val, svfloat64x2_t_val);
  svamax_f64_x4(svfloat64x4_t_val, svfloat64x4_t_val);
  svamin(svfloat16x2_t_val, svfloat16x2_t_val);
  svamin(svfloat16x4_t_val, svfloat16x4_t_val);
  svamin(svfloat32x2_t_val, svfloat32x2_t_val);
  svamin(svfloat32x4_t_val, svfloat32x4_t_val);
  svamin(svfloat64x2_t_val, svfloat64x2_t_val);
  svamin(svfloat64x4_t_val, svfloat64x4_t_val);
  svamin_f16_x2(svfloat16x2_t_val, svfloat16x2_t_val);
  svamin_f16_x4(svfloat16x4_t_val, svfloat16x4_t_val);
  svamin_f32_x2(svfloat32x2_t_val, svfloat32x2_t_val);
  svamin_f32_x4(svfloat32x4_t_val, svfloat32x4_t_val);
  svamin_f64_x2(svfloat64x2_t_val, svfloat64x2_t_val);
  svamin_f64_x4(svfloat64x4_t_val, svfloat64x4_t_val);
}

void test_streaming_compatible(void) __arm_streaming_compatible{
  svfloat16x2_t svfloat16x2_t_val;
  svfloat16x4_t svfloat16x4_t_val;
  svfloat32x2_t svfloat32x2_t_val;
  svfloat32x4_t svfloat32x4_t_val;
  svfloat64x2_t svfloat64x2_t_val;
  svfloat64x4_t svfloat64x4_t_val;

  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svamax(svfloat16x2_t_val, svfloat16x2_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svamax(svfloat16x4_t_val, svfloat16x4_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svamax(svfloat32x2_t_val, svfloat32x2_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svamax(svfloat32x4_t_val, svfloat32x4_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svamax(svfloat64x2_t_val, svfloat64x2_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svamax(svfloat64x4_t_val, svfloat64x4_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svamax_f16_x2(svfloat16x2_t_val, svfloat16x2_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svamax_f16_x4(svfloat16x4_t_val, svfloat16x4_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svamax_f32_x2(svfloat32x2_t_val, svfloat32x2_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svamax_f32_x4(svfloat32x4_t_val, svfloat32x4_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svamax_f64_x2(svfloat64x2_t_val, svfloat64x2_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svamax_f64_x4(svfloat64x4_t_val, svfloat64x4_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svamin(svfloat16x2_t_val, svfloat16x2_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svamin(svfloat16x4_t_val, svfloat16x4_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svamin(svfloat32x2_t_val, svfloat32x2_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svamin(svfloat32x4_t_val, svfloat32x4_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svamin(svfloat64x2_t_val, svfloat64x2_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svamin(svfloat64x4_t_val, svfloat64x4_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svamin_f16_x2(svfloat16x2_t_val, svfloat16x2_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svamin_f16_x4(svfloat16x4_t_val, svfloat16x4_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svamin_f32_x2(svfloat32x2_t_val, svfloat32x2_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svamin_f32_x4(svfloat32x4_t_val, svfloat32x4_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svamin_f64_x2(svfloat64x2_t_val, svfloat64x2_t_val);
  // streaming-guard-error@+1 {{builtin can only be called from a streaming function}}
  svamin_f64_x4(svfloat64x4_t_val, svfloat64x4_t_val);
}
