Files
TheRock/compiler/amd-llvm/clang/test/Sema/aarch64-neon-immediate-ranges/saturating-multiply-by-scalar-and-widen.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

194 lines
12 KiB
C

// RUN: %clang_cc1 -triple aarch64-linux-gnu -target-feature +neon -ffreestanding -fsyntax-only -verify %s
#include <arm_neon.h>
// REQUIRES: aarch64-registered-target
void test_saturating_multiply_by_scalar_and_widen_s16(int16x4_t arg_i16x4, int16x8_t arg_i16x8, int16_t arg_i16) {
vqdmull_lane_s16(arg_i16x4, arg_i16x4, 0);
vqdmull_lane_s16(arg_i16x4, arg_i16x4, 3);
vqdmull_lane_s16(arg_i16x4, arg_i16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqdmull_lane_s16(arg_i16x4, arg_i16x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqdmullh_lane_s16(arg_i16, arg_i16x4, 0);
vqdmullh_lane_s16(arg_i16, arg_i16x4, 3);
vqdmullh_lane_s16(arg_i16, arg_i16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqdmullh_lane_s16(arg_i16, arg_i16x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqdmull_high_lane_s16(arg_i16x8, arg_i16x4, 0);
vqdmull_high_lane_s16(arg_i16x8, arg_i16x4, 3);
vqdmull_high_lane_s16(arg_i16x8, arg_i16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqdmull_high_lane_s16(arg_i16x8, arg_i16x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqdmull_laneq_s16(arg_i16x4, arg_i16x8, 0);
vqdmull_laneq_s16(arg_i16x4, arg_i16x8, 7);
vqdmull_laneq_s16(arg_i16x4, arg_i16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqdmull_laneq_s16(arg_i16x4, arg_i16x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqdmullh_laneq_s16(arg_i16, arg_i16x8, 0);
vqdmullh_laneq_s16(arg_i16, arg_i16x8, 7);
vqdmullh_laneq_s16(arg_i16, arg_i16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqdmullh_laneq_s16(arg_i16, arg_i16x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqdmull_high_laneq_s16(arg_i16x8, arg_i16x8, 0);
vqdmull_high_laneq_s16(arg_i16x8, arg_i16x8, 7);
vqdmull_high_laneq_s16(arg_i16x8, arg_i16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqdmull_high_laneq_s16(arg_i16x8, arg_i16x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqdmulh_lane_s16(arg_i16x4, arg_i16x4, 0);
vqdmulh_lane_s16(arg_i16x4, arg_i16x4, 3);
vqdmulh_lane_s16(arg_i16x4, arg_i16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqdmulh_lane_s16(arg_i16x4, arg_i16x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqdmulhq_lane_s16(arg_i16x8, arg_i16x4, 0);
vqdmulhq_lane_s16(arg_i16x8, arg_i16x4, 3);
vqdmulhq_lane_s16(arg_i16x8, arg_i16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqdmulhq_lane_s16(arg_i16x8, arg_i16x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqdmulhh_lane_s16(arg_i16, arg_i16x4, 0);
vqdmulhh_lane_s16(arg_i16, arg_i16x4, 3);
vqdmulhh_lane_s16(arg_i16, arg_i16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqdmulhh_lane_s16(arg_i16, arg_i16x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqdmulh_laneq_s16(arg_i16x4, arg_i16x8, 0);
vqdmulh_laneq_s16(arg_i16x4, arg_i16x8, 7);
vqdmulh_laneq_s16(arg_i16x4, arg_i16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqdmulh_laneq_s16(arg_i16x4, arg_i16x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqdmulhq_laneq_s16(arg_i16x8, arg_i16x8, 0);
vqdmulhq_laneq_s16(arg_i16x8, arg_i16x8, 7);
vqdmulhq_laneq_s16(arg_i16x8, arg_i16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqdmulhq_laneq_s16(arg_i16x8, arg_i16x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqdmulhh_laneq_s16(arg_i16, arg_i16x8, 0);
vqdmulhh_laneq_s16(arg_i16, arg_i16x8, 7);
vqdmulhh_laneq_s16(arg_i16, arg_i16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqdmulhh_laneq_s16(arg_i16, arg_i16x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmulh_lane_s16(arg_i16x4, arg_i16x4, 0);
vqrdmulh_lane_s16(arg_i16x4, arg_i16x4, 3);
vqrdmulh_lane_s16(arg_i16x4, arg_i16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmulh_lane_s16(arg_i16x4, arg_i16x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmulhq_lane_s16(arg_i16x8, arg_i16x4, 0);
vqrdmulhq_lane_s16(arg_i16x8, arg_i16x4, 3);
vqrdmulhq_lane_s16(arg_i16x8, arg_i16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmulhq_lane_s16(arg_i16x8, arg_i16x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmulhh_lane_s16(arg_i16, arg_i16x4, 0);
vqrdmulhh_lane_s16(arg_i16, arg_i16x4, 3);
vqrdmulhh_lane_s16(arg_i16, arg_i16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmulhh_lane_s16(arg_i16, arg_i16x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmulh_laneq_s16(arg_i16x4, arg_i16x8, 0);
vqrdmulh_laneq_s16(arg_i16x4, arg_i16x8, 7);
vqrdmulh_laneq_s16(arg_i16x4, arg_i16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmulh_laneq_s16(arg_i16x4, arg_i16x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmulhq_laneq_s16(arg_i16x8, arg_i16x8, 0);
vqrdmulhq_laneq_s16(arg_i16x8, arg_i16x8, 7);
vqrdmulhq_laneq_s16(arg_i16x8, arg_i16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmulhq_laneq_s16(arg_i16x8, arg_i16x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmulhh_laneq_s16(arg_i16, arg_i16x8, 0);
vqrdmulhh_laneq_s16(arg_i16, arg_i16x8, 7);
vqrdmulhh_laneq_s16(arg_i16, arg_i16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmulhh_laneq_s16(arg_i16, arg_i16x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}
}
void test_saturating_multiply_by_scalar_and_widen_s32(int32x2_t arg_i32x2, int32_t arg_i32, int32x4_t arg_i32x4) {
vqdmull_lane_s32(arg_i32x2, arg_i32x2, 0);
vqdmull_lane_s32(arg_i32x2, arg_i32x2, 1);
vqdmull_lane_s32(arg_i32x2, arg_i32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqdmull_lane_s32(arg_i32x2, arg_i32x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqdmulls_lane_s32(arg_i32, arg_i32x2, 0);
vqdmulls_lane_s32(arg_i32, arg_i32x2, 1);
vqdmulls_lane_s32(arg_i32, arg_i32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqdmulls_lane_s32(arg_i32, arg_i32x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqdmull_high_lane_s32(arg_i32x4, arg_i32x2, 0);
vqdmull_high_lane_s32(arg_i32x4, arg_i32x2, 1);
vqdmull_high_lane_s32(arg_i32x4, arg_i32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqdmull_high_lane_s32(arg_i32x4, arg_i32x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqdmull_laneq_s32(arg_i32x2, arg_i32x4, 0);
vqdmull_laneq_s32(arg_i32x2, arg_i32x4, 3);
vqdmull_laneq_s32(arg_i32x2, arg_i32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqdmull_laneq_s32(arg_i32x2, arg_i32x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqdmulls_laneq_s32(arg_i32, arg_i32x4, 0);
vqdmulls_laneq_s32(arg_i32, arg_i32x4, 3);
vqdmulls_laneq_s32(arg_i32, arg_i32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqdmulls_laneq_s32(arg_i32, arg_i32x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqdmull_high_laneq_s32(arg_i32x4, arg_i32x4, 0);
vqdmull_high_laneq_s32(arg_i32x4, arg_i32x4, 3);
vqdmull_high_laneq_s32(arg_i32x4, arg_i32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqdmull_high_laneq_s32(arg_i32x4, arg_i32x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqdmulh_lane_s32(arg_i32x2, arg_i32x2, 0);
vqdmulh_lane_s32(arg_i32x2, arg_i32x2, 1);
vqdmulh_lane_s32(arg_i32x2, arg_i32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqdmulh_lane_s32(arg_i32x2, arg_i32x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqdmulhq_lane_s32(arg_i32x4, arg_i32x2, 0);
vqdmulhq_lane_s32(arg_i32x4, arg_i32x2, 1);
vqdmulhq_lane_s32(arg_i32x4, arg_i32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqdmulhq_lane_s32(arg_i32x4, arg_i32x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqdmulhs_lane_s32(arg_i32, arg_i32x2, 0);
vqdmulhs_lane_s32(arg_i32, arg_i32x2, 1);
vqdmulhs_lane_s32(arg_i32, arg_i32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqdmulhs_lane_s32(arg_i32, arg_i32x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqdmulh_laneq_s32(arg_i32x2, arg_i32x4, 0);
vqdmulh_laneq_s32(arg_i32x2, arg_i32x4, 3);
vqdmulh_laneq_s32(arg_i32x2, arg_i32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqdmulh_laneq_s32(arg_i32x2, arg_i32x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqdmulhq_laneq_s32(arg_i32x4, arg_i32x4, 0);
vqdmulhq_laneq_s32(arg_i32x4, arg_i32x4, 3);
vqdmulhq_laneq_s32(arg_i32x4, arg_i32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqdmulhq_laneq_s32(arg_i32x4, arg_i32x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqdmulhs_laneq_s32(arg_i32, arg_i32x4, 0);
vqdmulhs_laneq_s32(arg_i32, arg_i32x4, 3);
vqdmulhs_laneq_s32(arg_i32, arg_i32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqdmulhs_laneq_s32(arg_i32, arg_i32x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmulh_lane_s32(arg_i32x2, arg_i32x2, 0);
vqrdmulh_lane_s32(arg_i32x2, arg_i32x2, 1);
vqrdmulh_lane_s32(arg_i32x2, arg_i32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmulh_lane_s32(arg_i32x2, arg_i32x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmulhq_lane_s32(arg_i32x4, arg_i32x2, 0);
vqrdmulhq_lane_s32(arg_i32x4, arg_i32x2, 1);
vqrdmulhq_lane_s32(arg_i32x4, arg_i32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmulhq_lane_s32(arg_i32x4, arg_i32x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmulhs_lane_s32(arg_i32, arg_i32x2, 0);
vqrdmulhs_lane_s32(arg_i32, arg_i32x2, 1);
vqrdmulhs_lane_s32(arg_i32, arg_i32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmulhs_lane_s32(arg_i32, arg_i32x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmulh_laneq_s32(arg_i32x2, arg_i32x4, 0);
vqrdmulh_laneq_s32(arg_i32x2, arg_i32x4, 3);
vqrdmulh_laneq_s32(arg_i32x2, arg_i32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmulh_laneq_s32(arg_i32x2, arg_i32x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmulhq_laneq_s32(arg_i32x4, arg_i32x4, 0);
vqrdmulhq_laneq_s32(arg_i32x4, arg_i32x4, 3);
vqrdmulhq_laneq_s32(arg_i32x4, arg_i32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmulhq_laneq_s32(arg_i32x4, arg_i32x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmulhs_laneq_s32(arg_i32, arg_i32x4, 0);
vqrdmulhs_laneq_s32(arg_i32, arg_i32x4, 3);
vqrdmulhs_laneq_s32(arg_i32, arg_i32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
vqrdmulhs_laneq_s32(arg_i32, arg_i32x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
}