diff options
author | Alexandros Lamprineas <alexandros.lamprineas@arm.com> | 2019-07-14 20:31:15 +0000 |
---|---|---|
committer | Alexandros Lamprineas <alexandros.lamprineas@arm.com> | 2019-07-14 20:31:15 +0000 |
commit | 951bb68ce262545bdb0bff536256e0514daf0046 (patch) | |
tree | 0cc9943a61daac686e1bb794c3f1e150a936051d /clang/test/Preprocessor/arm-target-features.c | |
parent | 9428d95ce7f84844a076fe13219db96a78e3bd44 (diff) | |
download | bcm5719-llvm-951bb68ce262545bdb0bff536256e0514daf0046.tar.gz bcm5719-llvm-951bb68ce262545bdb0bff536256e0514daf0046.zip |
[TargetParser][ARM] Account dependencies when processing target features
Teaches ARM::appendArchExtFeatures to account dependencies when processing
target features: i.e. when you say -march=armv8.1-m.main+mve.fp+nofp it
means mve.fp should get discarded too. (Split from D63936)
Differential Revision: https://reviews.llvm.org/D64048
llvm-svn: 366031
Diffstat (limited to 'clang/test/Preprocessor/arm-target-features.c')
-rw-r--r-- | clang/test/Preprocessor/arm-target-features.c | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/clang/test/Preprocessor/arm-target-features.c b/clang/test/Preprocessor/arm-target-features.c index 95231e2a812..df5af4a9337 100644 --- a/clang/test/Preprocessor/arm-target-features.c +++ b/clang/test/Preprocessor/arm-target-features.c @@ -762,12 +762,29 @@ // CHECK-V81M-MVE: #define __ARM_FEATURE_MVE 1 // CHECK-V81M-MVE: #define __ARM_FEATURE_SIMD32 1 -// RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main+mve.fp -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V81M-MVE-FP %s -// CHECK-V81M-MVE-FP: #define __ARM_FEATURE_DSP 1 -// CHECK-V81M-MVE-FP: #define __ARM_FEATURE_FP16_SCALAR_ARITHMETIC 1 -// CHECK-V81M-MVE-FP: #define __ARM_FEATURE_MVE 3 -// CHECK-V81M-MVE-FP: #define __ARM_FEATURE_SIMD32 1 -// CHECK-V81M-MVE-FP: #define __ARM_FPV5__ 1 +// RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main+mve.fp -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V81M-MVEFP %s +// CHECK-V81M-MVEFP: #define __ARM_FEATURE_DSP 1 +// CHECK-V81M-MVEFP: #define __ARM_FEATURE_FP16_SCALAR_ARITHMETIC 1 +// CHECK-V81M-MVEFP: #define __ARM_FEATURE_MVE 3 +// CHECK-V81M-MVEFP: #define __ARM_FEATURE_SIMD32 1 +// CHECK-V81M-MVEFP: #define __ARM_FPV5__ 1 + +// nofp discards mve.fp +// RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main+mve.fp+nofp -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V81M-MVEFP-NOFP %s +// CHECK-V81M-MVEFP-NOFP-NOT: #define __ARM_FEATURE_MVE + +// nomve discards mve.fp +// RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main+mve.fp+nomve -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V81M-MVEFP-NOMVE %s +// CHECK-V81M-MVEFP-NOMVE-NOT: #define __ARM_FEATURE_MVE + +// mve+fp doesn't imply mve.fp +// RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main+mve+fp -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V81M-MVE-FP %s +// CHECK-V81M-MVE-FP: #define __ARM_FEATURE_MVE 1 + +// nodsp discards both dsp and mve +// RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main+mve+nodsp -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V81M-MVE-NODSP %s +// CHECK-V81M-MVE-NODSP-NOT: #define __ARM_FEATURE_MVE +// CHECK-V81M-MVE-NODSP-NOT: #define __ARM_FEATURE_DSP // RUN: %clang -target armv8.1a-none-none-eabi -x c -E -dM %s -o - | FileCheck -match-full-lines --check-prefix=CHECK-V81A %s // CHECK-V81A: #define __ARM_ARCH 8 |