Files
TheRock/compiler/amd-llvm/clang/test/Sema/aarch64-neon-immediate-ranges/sqrdmlah-ranges.c
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

131 lines
9.2 KiB
C

// RUN: %clang_cc1 -triple aarch64-linux-gnu -target-feature +neon -target-feature +v8.1a -ffreestanding -fsyntax-only -verify %s
#include <arm_neon.h>
// REQUIRES: aarch64-registered-target
void test_saturating_multiply_accumulate_by_element_s16(int16x8_t arg_i16x8, int16_t arg_i16, int16x4_t arg_i16x4) {
vqrdmlah_lane_s16(arg_i16x4, arg_i16x4, arg_i16x4, 0);
vqrdmlah_lane_s16(arg_i16x4, arg_i16x4, arg_i16x4, 3);
vqrdmlah_lane_s16(arg_i16x4, arg_i16x4, arg_i16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmlah_lane_s16(arg_i16x4, arg_i16x4, arg_i16x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmlahq_lane_s16(arg_i16x8, arg_i16x8, arg_i16x4, 0);
vqrdmlahq_lane_s16(arg_i16x8, arg_i16x8, arg_i16x4, 3);
vqrdmlahq_lane_s16(arg_i16x8, arg_i16x8, arg_i16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmlahq_lane_s16(arg_i16x8, arg_i16x8, arg_i16x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmlah_laneq_s16(arg_i16x4, arg_i16x4, arg_i16x8, 0);
vqrdmlah_laneq_s16(arg_i16x4, arg_i16x4, arg_i16x8, 7);
vqrdmlah_laneq_s16(arg_i16x4, arg_i16x4, arg_i16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmlah_laneq_s16(arg_i16x4, arg_i16x4, arg_i16x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmlahq_laneq_s16(arg_i16x8, arg_i16x8, arg_i16x8, 0);
vqrdmlahq_laneq_s16(arg_i16x8, arg_i16x8, arg_i16x8, 7);
vqrdmlahq_laneq_s16(arg_i16x8, arg_i16x8, arg_i16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmlahq_laneq_s16(arg_i16x8, arg_i16x8, arg_i16x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmlsh_lane_s16(arg_i16x4, arg_i16x4, arg_i16x4, 0);
vqrdmlsh_lane_s16(arg_i16x4, arg_i16x4, arg_i16x4, 3);
vqrdmlsh_lane_s16(arg_i16x4, arg_i16x4, arg_i16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmlsh_lane_s16(arg_i16x4, arg_i16x4, arg_i16x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmlshq_lane_s16(arg_i16x8, arg_i16x8, arg_i16x4, 0);
vqrdmlshq_lane_s16(arg_i16x8, arg_i16x8, arg_i16x4, 3);
vqrdmlshq_lane_s16(arg_i16x8, arg_i16x8, arg_i16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmlshq_lane_s16(arg_i16x8, arg_i16x8, arg_i16x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmlsh_laneq_s16(arg_i16x4, arg_i16x4, arg_i16x8, 0);
vqrdmlsh_laneq_s16(arg_i16x4, arg_i16x4, arg_i16x8, 7);
vqrdmlsh_laneq_s16(arg_i16x4, arg_i16x4, arg_i16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmlsh_laneq_s16(arg_i16x4, arg_i16x4, arg_i16x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmlshq_laneq_s16(arg_i16x8, arg_i16x8, arg_i16x8, 0);
vqrdmlshq_laneq_s16(arg_i16x8, arg_i16x8, arg_i16x8, 7);
vqrdmlshq_laneq_s16(arg_i16x8, arg_i16x8, arg_i16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmlshq_laneq_s16(arg_i16x8, arg_i16x8, arg_i16x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmlahh_lane_s16(arg_i16, arg_i16, arg_i16x4, 0);
vqrdmlahh_lane_s16(arg_i16, arg_i16, arg_i16x4, 3);
vqrdmlahh_lane_s16(arg_i16, arg_i16, arg_i16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmlahh_lane_s16(arg_i16, arg_i16, arg_i16x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmlahh_laneq_s16(arg_i16, arg_i16, arg_i16x8, 0);
vqrdmlahh_laneq_s16(arg_i16, arg_i16, arg_i16x8, 7);
vqrdmlahh_laneq_s16(arg_i16, arg_i16, arg_i16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmlahh_laneq_s16(arg_i16, arg_i16, arg_i16x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmlshh_lane_s16(arg_i16, arg_i16, arg_i16x4, 0);
vqrdmlshh_lane_s16(arg_i16, arg_i16, arg_i16x4, 3);
vqrdmlshh_lane_s16(arg_i16, arg_i16, arg_i16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmlshh_lane_s16(arg_i16, arg_i16, arg_i16x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmlshh_laneq_s16(arg_i16, arg_i16, arg_i16x8, 0);
vqrdmlshh_laneq_s16(arg_i16, arg_i16, arg_i16x8, 7);
vqrdmlshh_laneq_s16(arg_i16, arg_i16, arg_i16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmlshh_laneq_s16(arg_i16, arg_i16, arg_i16x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}
}
void test_saturating_multiply_accumulate_by_element_s32(int32x2_t arg_i32x2, int32x4_t arg_i32x4, int32_t arg_i32) {
vqrdmlah_lane_s32(arg_i32x2, arg_i32x2, arg_i32x2, 0);
vqrdmlah_lane_s32(arg_i32x2, arg_i32x2, arg_i32x2, 1);
vqrdmlah_lane_s32(arg_i32x2, arg_i32x2, arg_i32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmlah_lane_s32(arg_i32x2, arg_i32x2, arg_i32x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmlahq_lane_s32(arg_i32x4, arg_i32x4, arg_i32x2, 0);
vqrdmlahq_lane_s32(arg_i32x4, arg_i32x4, arg_i32x2, 1);
vqrdmlahq_lane_s32(arg_i32x4, arg_i32x4, arg_i32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmlahq_lane_s32(arg_i32x4, arg_i32x4, arg_i32x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmlah_laneq_s32(arg_i32x2, arg_i32x2, arg_i32x4, 0);
vqrdmlah_laneq_s32(arg_i32x2, arg_i32x2, arg_i32x4, 3);
vqrdmlah_laneq_s32(arg_i32x2, arg_i32x2, arg_i32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmlah_laneq_s32(arg_i32x2, arg_i32x2, arg_i32x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmlahq_laneq_s32(arg_i32x4, arg_i32x4, arg_i32x4, 0);
vqrdmlahq_laneq_s32(arg_i32x4, arg_i32x4, arg_i32x4, 3);
vqrdmlahq_laneq_s32(arg_i32x4, arg_i32x4, arg_i32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmlahq_laneq_s32(arg_i32x4, arg_i32x4, arg_i32x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmlsh_lane_s32(arg_i32x2, arg_i32x2, arg_i32x2, 0);
vqrdmlsh_lane_s32(arg_i32x2, arg_i32x2, arg_i32x2, 1);
vqrdmlsh_lane_s32(arg_i32x2, arg_i32x2, arg_i32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmlsh_lane_s32(arg_i32x2, arg_i32x2, arg_i32x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmlshq_lane_s32(arg_i32x4, arg_i32x4, arg_i32x2, 0);
vqrdmlshq_lane_s32(arg_i32x4, arg_i32x4, arg_i32x2, 1);
vqrdmlshq_lane_s32(arg_i32x4, arg_i32x4, arg_i32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmlshq_lane_s32(arg_i32x4, arg_i32x4, arg_i32x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmlsh_laneq_s32(arg_i32x2, arg_i32x2, arg_i32x4, 0);
vqrdmlsh_laneq_s32(arg_i32x2, arg_i32x2, arg_i32x4, 3);
vqrdmlsh_laneq_s32(arg_i32x2, arg_i32x2, arg_i32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmlsh_laneq_s32(arg_i32x2, arg_i32x2, arg_i32x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmlshq_laneq_s32(arg_i32x4, arg_i32x4, arg_i32x4, 0);
vqrdmlshq_laneq_s32(arg_i32x4, arg_i32x4, arg_i32x4, 3);
vqrdmlshq_laneq_s32(arg_i32x4, arg_i32x4, arg_i32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmlshq_laneq_s32(arg_i32x4, arg_i32x4, arg_i32x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmlahs_lane_s32(arg_i32, arg_i32, arg_i32x2, 0);
vqrdmlahs_lane_s32(arg_i32, arg_i32, arg_i32x2, 1);
vqrdmlahs_lane_s32(arg_i32, arg_i32, arg_i32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmlahs_lane_s32(arg_i32, arg_i32, arg_i32x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmlahs_laneq_s32(arg_i32, arg_i32, arg_i32x4, 0);
vqrdmlahs_laneq_s32(arg_i32, arg_i32, arg_i32x4, 3);
vqrdmlahs_laneq_s32(arg_i32, arg_i32, arg_i32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmlahs_laneq_s32(arg_i32, arg_i32, arg_i32x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmlshs_lane_s32(arg_i32, arg_i32, arg_i32x2, 0);
vqrdmlshs_lane_s32(arg_i32, arg_i32, arg_i32x2, 1);
vqrdmlshs_lane_s32(arg_i32, arg_i32, arg_i32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmlshs_lane_s32(arg_i32, arg_i32, arg_i32x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmlshs_laneq_s32(arg_i32, arg_i32, arg_i32x4, 0);
vqrdmlshs_laneq_s32(arg_i32, arg_i32, arg_i32x4, 3);
vqrdmlshs_laneq_s32(arg_i32, arg_i32, arg_i32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmlshs_laneq_s32(arg_i32, arg_i32, arg_i32x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
}