RosieSumpter created this revision. RosieSumpter added reviewers: sdesmalen, paulwalker-arm. Herald added subscribers: ctetreau, psnobl, tschuett. Herald added a reviewer: efriedma. Herald added a project: All. RosieSumpter requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits.
Currently for SVE ACLE builtins, single tests are used to verify both clang code generation (when the feature is available) and semantic error/warning messages (when the feature is unavailable). This patch moves the semantic tests for ACLE builtins requiring the +sve2-aes feature flag into dedicated sema tests, leaving the codegen tests purely for code generation. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D123605 Files: clang/test/CodeGen/aarch64-sve2-intrinsics/acle_sve2_aesd.c clang/test/CodeGen/aarch64-sve2-intrinsics/acle_sve2_aese.c clang/test/CodeGen/aarch64-sve2-intrinsics/acle_sve2_aesimc.c clang/test/CodeGen/aarch64-sve2-intrinsics/acle_sve2_aesmc.c clang/test/CodeGen/aarch64-sve2-intrinsics/acle_sve2_pmullb_128.c clang/test/CodeGen/aarch64-sve2-intrinsics/acle_sve2_pmullt_128.c clang/test/Sema/aarch64-acle-sve2-aes.c
Index: clang/test/Sema/aarch64-acle-sve2-aes.c =================================================================== --- /dev/null +++ clang/test/Sema/aarch64-acle-sve2-aes.c @@ -0,0 +1,51 @@ +// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve2 -fallow-half-arguments-and-returns -fsyntax-only -std=c99 -verify -verify-ignore-unexpected=error %s + +#include <arm_sve.h> + +svuint8_t test_svaesd_u8(svuint8_t op1, svuint8_t op2) +{ + // expected-warning@+1 {{implicit declaration of function 'svaesd_u8'}} + return svaesd_u8(op1, op2); +} + +svuint8_t test_svaese_u8(svuint8_t op1, svuint8_t op2) +{ + // expected-warning@+1 {{implicit declaration of function 'svaese_u8'}} + return svaese_u8(op1, op2); +} + +svuint8_t test_svaesimc_u8(svuint8_t op) +{ + // expected-warning@+1 {{implicit declaration of function 'svaesimc_u8'}} + return svaesimc_u8(op); +} + +svuint8_t test_svaesmc_u8(svuint8_t op) +{ + // expected-warning@+1 {{implicit declaration of function 'svaesmc_u8'}} + return svaesmc_u8(op); +} + +svuint64_t test_svpmullb_pair_u64(svuint64_t op1, svuint64_t op2) +{ + // expected-warning@+1 {{implicit declaration of function 'svpmullb_pair_u64'}} + return svpmullb_pair_u64(op1, op2); +} + +svuint64_t test_svpmullb_pair_n_u64(svuint64_t op1, uint64_t op2) +{ + // expected-warning@+1 {{implicit declaration of function 'svpmullb_pair_n_u64'}} + return svpmullb_pair_n_u64(op1, op2); +} + +svuint64_t test_svpmullt_pair_u64(svuint64_t op1, svuint64_t op2) +{ + // expected-warning@+1 {{implicit declaration of function 'svpmullt_pair_u64'}} + return svpmullt_pair_u64(op1, op2); +} + +svuint64_t test_svpmullt_pair_n_u64(svuint64_t op1, uint64_t op2) +{ + // expected-warning@+1 {{implicit declaration of function 'svpmullt_pair_n_u64'}} + return svpmullt_pair_n_u64(op1, op2); +} Index: clang/test/CodeGen/aarch64-sve2-intrinsics/acle_sve2_pmullt_128.c =================================================================== --- clang/test/CodeGen/aarch64-sve2-intrinsics/acle_sve2_pmullt_128.c +++ clang/test/CodeGen/aarch64-sve2-intrinsics/acle_sve2_pmullt_128.c @@ -5,8 +5,6 @@ // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve2-aes -fallow-half-arguments-and-returns -S -O1 -Werror -Wall -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve2-aes -fallow-half-arguments-and-returns -S -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve2-aes -fallow-half-arguments-and-returns -S -O1 -Werror -Wall -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefix=CPP-CHECK -// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -fallow-half-arguments-and-returns -fsyntax-only -std=c99 -verify -verify-ignore-unexpected=error %s -// RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve -fallow-half-arguments-and-returns -fsyntax-only -std=c99 -verify=overload -verify-ignore-unexpected=error %s #include <arm_sve.h> @@ -29,8 +27,6 @@ // svuint64_t test_svpmullt_pair_u64(svuint64_t op1, svuint64_t op2) { - // overload-warning@+2 {{implicit declaration of function 'svpmullt_pair'}} - // expected-warning@+1 {{implicit declaration of function 'svpmullt_pair_u64'}} return SVE_ACLE_FUNC(svpmullt_pair,_u64,,)(op1, op2); } @@ -50,7 +46,5 @@ // svuint64_t test_svpmullt_pair_n_u64(svuint64_t op1, uint64_t op2) { - // overload-warning@+2 {{implicit declaration of function 'svpmullt_pair'}} - // expected-warning@+1 {{implicit declaration of function 'svpmullt_pair_n_u64'}} return SVE_ACLE_FUNC(svpmullt_pair,_n_u64,,)(op1, op2); } Index: clang/test/CodeGen/aarch64-sve2-intrinsics/acle_sve2_pmullb_128.c =================================================================== --- clang/test/CodeGen/aarch64-sve2-intrinsics/acle_sve2_pmullb_128.c +++ clang/test/CodeGen/aarch64-sve2-intrinsics/acle_sve2_pmullb_128.c @@ -5,8 +5,6 @@ // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve2-aes -fallow-half-arguments-and-returns -S -O1 -Werror -Wall -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve2-aes -fallow-half-arguments-and-returns -S -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve2-aes -fallow-half-arguments-and-returns -S -O1 -Werror -Wall -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefix=CPP-CHECK -// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -fallow-half-arguments-and-returns -fsyntax-only -std=c99 -verify -verify-ignore-unexpected=error %s -// RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve -fallow-half-arguments-and-returns -fsyntax-only -std=c99 -verify=overload -verify-ignore-unexpected=error %s #include <arm_sve.h> @@ -29,8 +27,6 @@ // svuint64_t test_svpmullb_pair_u64(svuint64_t op1, svuint64_t op2) { - // overload-warning@+2 {{implicit declaration of function 'svpmullb_pair'}} - // expected-warning@+1 {{implicit declaration of function 'svpmullb_pair_u64'}} return SVE_ACLE_FUNC(svpmullb_pair,_u64,,)(op1, op2); } @@ -50,7 +46,5 @@ // svuint64_t test_svpmullb_pair_n_u64(svuint64_t op1, uint64_t op2) { - // overload-warning@+2 {{implicit declaration of function 'svpmullb_pair'}} - // expected-warning@+1 {{implicit declaration of function 'svpmullb_pair_n_u64'}} return SVE_ACLE_FUNC(svpmullb_pair,_n_u64,,)(op1, op2); } Index: clang/test/CodeGen/aarch64-sve2-intrinsics/acle_sve2_aesmc.c =================================================================== --- clang/test/CodeGen/aarch64-sve2-intrinsics/acle_sve2_aesmc.c +++ clang/test/CodeGen/aarch64-sve2-intrinsics/acle_sve2_aesmc.c @@ -3,8 +3,6 @@ // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve2-aes -fallow-half-arguments-and-returns -S -O1 -Werror -Wall -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve2-aes -fallow-half-arguments-and-returns -S -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve2-aes -fallow-half-arguments-and-returns -S -O1 -Werror -Wall -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefix=CPP-CHECK -// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -fallow-half-arguments-and-returns -fsyntax-only -std=c99 -verify -verify-ignore-unexpected=error %s -// RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve -fallow-half-arguments-and-returns -fsyntax-only -std=c99 -verify=overload -verify-ignore-unexpected=error %s // REQUIRES: aarch64-registered-target @@ -29,7 +27,5 @@ // svuint8_t test_svaesmc_u8(svuint8_t op) { - // overload-warning@+2 {{implicit declaration of function 'svaesmc'}} - // expected-warning@+1 {{implicit declaration of function 'svaesmc_u8'}} return SVE_ACLE_FUNC(svaesmc,_u8,,)(op); } Index: clang/test/CodeGen/aarch64-sve2-intrinsics/acle_sve2_aesimc.c =================================================================== --- clang/test/CodeGen/aarch64-sve2-intrinsics/acle_sve2_aesimc.c +++ clang/test/CodeGen/aarch64-sve2-intrinsics/acle_sve2_aesimc.c @@ -3,8 +3,6 @@ // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve2-aes -fallow-half-arguments-and-returns -S -O1 -Werror -Wall -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve2-aes -fallow-half-arguments-and-returns -S -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve2-aes -fallow-half-arguments-and-returns -S -O1 -Werror -Wall -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefix=CPP-CHECK -// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -fallow-half-arguments-and-returns -fsyntax-only -std=c99 -verify -verify-ignore-unexpected=error %s -// RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve -fallow-half-arguments-and-returns -fsyntax-only -std=c99 -verify=overload -verify-ignore-unexpected=error %s // REQUIRES: aarch64-registered-target @@ -29,7 +27,5 @@ // svuint8_t test_svaesimc_u8(svuint8_t op) { - // overload-warning@+2 {{implicit declaration of function 'svaesimc'}} - // expected-warning@+1 {{implicit declaration of function 'svaesimc_u8'}} return SVE_ACLE_FUNC(svaesimc,_u8,,)(op); } Index: clang/test/CodeGen/aarch64-sve2-intrinsics/acle_sve2_aese.c =================================================================== --- clang/test/CodeGen/aarch64-sve2-intrinsics/acle_sve2_aese.c +++ clang/test/CodeGen/aarch64-sve2-intrinsics/acle_sve2_aese.c @@ -3,8 +3,6 @@ // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve2-aes -fallow-half-arguments-and-returns -S -O1 -Werror -Wall -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve2-aes -fallow-half-arguments-and-returns -S -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve2-aes -fallow-half-arguments-and-returns -S -O1 -Werror -Wall -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefix=CPP-CHECK -// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -fallow-half-arguments-and-returns -fsyntax-only -std=c99 -verify -verify-ignore-unexpected=error %s -// RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve -fallow-half-arguments-and-returns -fsyntax-only -std=c99 -verify=overload -verify-ignore-unexpected=error %s // REQUIRES: aarch64-registered-target @@ -29,7 +27,5 @@ // svuint8_t test_svaese_u8(svuint8_t op1, svuint8_t op2) { - // overload-warning@+2 {{implicit declaration of function 'svaese'}} - // expected-warning@+1 {{implicit declaration of function 'svaese_u8'}} return SVE_ACLE_FUNC(svaese,_u8,,)(op1, op2); } Index: clang/test/CodeGen/aarch64-sve2-intrinsics/acle_sve2_aesd.c =================================================================== --- clang/test/CodeGen/aarch64-sve2-intrinsics/acle_sve2_aesd.c +++ clang/test/CodeGen/aarch64-sve2-intrinsics/acle_sve2_aesd.c @@ -3,8 +3,6 @@ // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve2-aes -fallow-half-arguments-and-returns -S -O1 -Werror -Wall -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve2-aes -fallow-half-arguments-and-returns -S -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve2-aes -fallow-half-arguments-and-returns -S -O1 -Werror -Wall -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefix=CPP-CHECK -// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -fallow-half-arguments-and-returns -fsyntax-only -std=c99 -verify -verify-ignore-unexpected=error %s -// RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve -fallow-half-arguments-and-returns -fsyntax-only -std=c99 -verify=overload -verify-ignore-unexpected=error %s // REQUIRES: aarch64-registered-target @@ -29,7 +27,5 @@ // svuint8_t test_svaesd_u8(svuint8_t op1, svuint8_t op2) { - // overload-warning@+2 {{implicit declaration of function 'svaesd'}} - // expected-warning@+1 {{implicit declaration of function 'svaesd_u8'}} return SVE_ACLE_FUNC(svaesd,_u8,,)(op1, op2); }
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits