Skip to content

Commit

Permalink
[Driver] Update FileCheck patterns for AArch64 target features
Browse files Browse the repository at this point in the history
...after upstream commit 13e977d changed
how target feature dependencies are handled.
  • Loading branch information
bryanpkc committed Apr 11, 2024
1 parent 96a9ea5 commit aede9da
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 36 deletions.
40 changes: 21 additions & 19 deletions clang/test/Driver/emit-flang-attrs.f90
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
! RUN: %flang -### -target aarch64-linux-gnu -march=armv8-a -c %s 2>&1 | FileCheck --check-prefix=CHECK-ATTRS-NEON %s
! RUN: %flang -### -target aarch64-linux-gnu -march=armv8-a+sve -c %s 2>&1 | FileCheck --check-prefix=CHECK-ATTRS-SVE %s
! RUN: %flang -### -target aarch64-linux-gnu -march=armv8-a+nosve -c %s 2>&1 | FileCheck --check-prefix=CHECK-ATTRS-NOSVE %s
! RUN: %flang -### -target aarch64-linux-gnu -march=armv8-a+sve+nosve -c %s 2>&1 | FileCheck --check-prefix=CHECK-ATTRS-NOSVE %s
! RUN: %flang -### -target aarch64-linux-gnu -march=armv8-a+sve+nosve -c %s 2>&1 | FileCheck --check-prefix=CHECK-ATTRS-SVE-REVERT %s
! RUN: %flang -### -target aarch64-linux-gnu -march=armv8-a+sve2+nosve2 -c %s 2>&1 | FileCheck %s --check-prefix=CHECK-SVE2-REVERT
! RUN: %flang -### -target aarch64-linux-gnu -march=armv8-a+sve2-aes -c %s 2>&1 | FileCheck %s --check-prefix=CHECK-SVE2-AES
! RUN: %flang -### -target aarch64-linux-gnu -march=armv8-a+sve2-sm4 -c %s 2>&1 | FileCheck %s --check-prefix=CHECK-SVE2-SM4
Expand All @@ -21,38 +21,40 @@
! RUN: %flang -### -target aarch64-linux-gnu -march=armv8-a+sve2-aes+nosve2-aes %s 2>&1 | FileCheck %s --check-prefix=CHECK-SVE2-AES-REVERT

! CHECK-ATTRS-NEON: "{{.*}}flang2"
! CHECK-ATTRS-NEON-SAME: "-target_features" "+neon,+v8a"
! CHECK-ATTRS-NEON-SAME: "-target_features" "+v8a,+fp-armv8,+neon"
! CHECK-ATTRS-SVE: "{{.*}}flang2"
! CHECK-ATTRS-SVE-SAME: "-target_features" "+neon,+v8a,+sve"
! CHECK-ATTRS-SVE-SAME: "-target_features" "+v8a,+fp-armv8,+fullfp16,+neon,+sve"
! CHECK-ATTRS-NOSVE: "{{.*}}flang2"
! CHECK-ATTRS-NOSVE-SAME: "-target_features" "+neon,+v8a,-sve,-sve2,-sve2-bitperm,-sve2-sha3,-sve2-aes,-sve2-sm4"
! CHECK-ATTRS-NOSVE-SAME: "-target_features" "+v8a,+fp-armv8,+neon"
! CHECK-ATTRS-SVE-REVERT: "{{.*}}flang2"
! CHECK-ATTRS-SVE-REVERT-SAME: "-target_features" "+v8a,+fp-armv8,+fullfp16,+neon,-sve"
! CHECK-SVE2-REVERT: "{{.*}}flang2"
! CHECK-SVE2-REVERT-SAME: "-target_features" "+neon,+v8a,+sve,-sve2,-sve2-bitperm,-sve2-sha3,-sve2-aes,-sve2-sm4"
! CHECK-SVE2-REVERT-SAME: "-target_features" "+v8a,+fp-armv8,+fullfp16,+neon,+sve,-sve2"
! CHECK-SVE2-AES: "{{.*}}flang2"
! CHECK-SVE2-AES-SAME: "-target_features" "+neon,+v8a,+sve2-aes,+sve,+sve2"
! CHECK-SVE2-AES-SAME: "-target_features" "+v8a,+fp-armv8,+fullfp16,+neon,+sve,+sve2-aes,+sve2"
! CHECK-SVE2-SM4: "{{.*}}flang2"
! CHECK-SVE2-SM4-SAME: "-target_features" "+neon,+v8a,+sve2-sm4,+sve,+sve2"
! CHECK-SVE2-SM4-SAME: "-target_features" "+v8a,+fp-armv8,+fullfp16,+neon,+sve,+sve2-sm4,+sve2"
! CHECK-SVE2-SHA3: "{{.*}}flang2"
! CHECK-SVE2-SHA3-SAME: "-target_features" "+neon,+v8a,+sve2-sha3,+sve,+sve2"
! CHECK-SVE2-SHA3-SAME: "-target_features" "+v8a,+fp-armv8,+fullfp16,+neon,+sve,+sve2-sha3,+sve2"
! CHECK-SVE2-BITPERM-REVERT: "{{.*}}flang2"
! CHECK-SVE2-BITPERM-REVERT-SAME: "-target_features" "+neon,+v8a,+sve,+sve2,-sve2-bitperm"
! CHECK-SVE2-BITPERM-REVERT-SAME: "-target_features" "+v8a,+fp-armv8,+fullfp16,+neon,+sve,-sve2-bitperm,+sve2"
! CHECK-SVE2-IMPLY: "{{.*}}flang2"
! CHECK-SVE2-IMPLY-SAME: "-target_features" "+neon,+v8a,+sve2,+sve"
! CHECK-SVE2-IMPLY-SAME: "-target_features" "+v8a,+fp-armv8,+fullfp16,+neon,+sve,+sve2"
! CHECK-SVE2-CONFLICT-REV: "{{.*}}flang2"
! CHECK-SVE2-CONFLICT-REV-SAME: "-target_features" "+neon,+v8a,-sve2-bitperm,-sve2-sha3,-sve2-aes,-sve2-sm4,+sve2,+sve"
! CHECK-SVE2-CONFLICT-REV-SAME: "-target_features" "+v8a,+fp-armv8,+fullfp16,+neon,+sve,+sve2"
! CHECK-SVE-SVE2: "{{.*}}flang2"
! CHECK-SVE-SVE2-SAME: "-target_features" "+neon,+v8a,+sve2,+sve"
! CHECK-SVE-SVE2-SAME: "-target_features" "+v8a,+fp-armv8,+fullfp16,+neon,+sve,+sve2"
! CHECK-SVE2-BITPERM: "{{.*}}flang2"
! CHECK-SVE2-BITPERM-SAME: "-target_features" "+neon,+v8a,+sve2-bitperm,+sve,+sve2"
! CHECK-SVE2-BITPERM-SAME: "-target_features" "+v8a,+fp-armv8,+fullfp16,+neon,+sve,+sve2-bitperm,+sve2"
! CHECK-SVE-SUBFEATURE-CONFLICT-REV: "{{.*}}flang2"
! CHECK-SVE-SUBFEATURE-CONFLICT-REV-SAME: "-target_features" "+neon,+v8a,-sve2-bitperm,-sve2-sha3,-sve2-sm4,+sve2-aes,+sve,+sve2"
! CHECK-SVE-SUBFEATURE-CONFLICT-REV-SAME: "-target_features" "+v8a,+fp-armv8,+fullfp16,+neon,+sve,+sve2-aes,+sve2"
! CHECK-SVE2-SUBFEATURE-CONFLICT: "{{.*}}flang2"
! CHECK-SVE2-SUBFEATURE-CONFLICT-SAME: "-target_features" "+neon,+v8a,+sve,-sve2,-sve2-bitperm,-sve2-sha3,-sve2-aes,-sve2-sm4"
! CHECK-SVE2-SUBFEATURE-CONFLICT-SAME: "-target_features" "+v8a,+fp-armv8,+fullfp16,+neon,+sve,-sve2-sm4,-sve2"
! CHECK-SVE2-SUBFEATURE-MIX: "{{.*}}flang2"
! CHECK-SVE2-SUBFEATURE-MIX-SAME: "-target_features" "+neon,+v8a,+sve2-bitperm,+sve,+sve2,-sve2-aes"
! CHECK-SVE2-SUBFEATURE-MIX-SAME: "-target_features" "+v8a,+fp-armv8,+fullfp16,+neon,+sve,+sve2-bitperm,+sve2"
! CHECK-SVE2-SM4-REVERT: "{{.*}}flang2"
! CHECK-SVE2-SM4-REVERT-SAME: "-target_features" "+neon,+v8a,+sve,+sve2,-sve2-sm4"
! CHECK-SVE2-SM4-REVERT-SAME: "-target_features" "+v8a,+fp-armv8,+fullfp16,+neon,+sve,-sve2-sm4,+sve2"
! CHECK-SVE2-SHA3-REVERT: "{{.*}}flang2"
! CHECK-SVE2-SHA3-REVERT-SAME: "-target_features" "+neon,+v8a,+sve,+sve2,-sve2-sha3"
! CHECK-SVE2-SHA3-REVERT-SAME: "-target_features" "+v8a,+fp-armv8,+fullfp16,+neon,+sve,-sve2-sha3,+sve2"
! CHECK-SVE2-AES-REVERT: "{{.*}}flang2"
! CHECK-SVE2-AES-REVERT-SAME: "-target_features" "+neon,+v8a,+sve,+sve2,-sve2-aes"
! CHECK-SVE2-AES-REVERT-SAME: "-target_features" "+v8a,+fp-armv8,+fullfp16,+neon,+sve,-sve2-aes,+sve2"
18 changes: 9 additions & 9 deletions clang/test/Driver/flang/classic-flang-vscale-mbits.f95
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@
// RUN: %clang --driver-mode=flang -### -S --target=aarch64 -march=armv8-a+sve2-sha3 -msve-vector-bits=2048+ %s 2>&1 | FileCheck -check-prefix=CHECK-SVE2SHA3-2048PLUS %s
// RUN: %clang --driver-mode=flang -### -S --target=aarch64 -march=armv8-a+sve2 -msve-vector-bits=scalable %s 2>&1 | FileCheck -check-prefix=CHECK-SVE2-SCALABLE %s

// CHECK-SVE-128: "-target_features" "+neon,+v8a,+sve"
// CHECK-SVE-128: "-target_features" "+v8a,+fp-armv8,+fullfp16,+neon,+sve"
// CHECK-SVE-128-DAG: "-vscale_range_min" "1" "-vscale_range_max" "1"
// CHECK-SVE-128PLUS: "-target_features" "+neon,+v8a,+sve"
// CHECK-SVE-128PLUS: "-target_features" "+v8a,+fp-armv8,+fullfp16,+neon,+sve"
// CHECK-SVE-128PLUS-DAG: "-vscale_range_min" "1" "-vscale_range_max" "0"
// CHECK-SVE-256: "-target_features" "+neon,+v8a,+sve"
// CHECK-SVE-256: "-target_features" "+v8a,+fp-armv8,+fullfp16,+neon,+sve"
// CHECK-SVE-256-DAG: "-vscale_range_min" "2" "-vscale_range_max" "2"
// CHECK-SVE-256PLUS: "-target_features" "+neon,+v8a,+sve"
// CHECK-SVE-256PLUS: "-target_features" "+v8a,+fp-armv8,+fullfp16,+neon,+sve"
// CHECK-SVE-256PLUS-DAG: "-vscale_range_min" "2" "-vscale_range_max" "0"
// CHECK-SVE2-512: "-target_features" "+neon,+v8a,+sve2,+sve"
// CHECK-SVE2-512: "-target_features" "+v8a,+fp-armv8,+fullfp16,+neon,+sve,+sve2"
// CHECK-SVE2-512-DAG: "-vscale_range_min" "4" "-vscale_range_max" "4"
// CHECK-SVE2-512PLUS: "-target_features" "+neon,+v8a,+sve2,+sve"
// CHECK-SVE2-512PLUS: "-target_features" "+v8a,+fp-armv8,+fullfp16,+neon,+sve,+sve2"
// CHECK-SVE2-512PLUS-DAG: "-vscale_range_min" "4" "-vscale_range_max" "0"
// CHECK-SVE2SHA3-2048: "-target_features" "+neon,+v8a,+sve2-sha3,+sve,+sve2"
// CHECK-SVE2SHA3-2048: "-target_features" "+v8a,+fp-armv8,+fullfp16,+neon,+sve,+sve2-sha3,+sve2"
// CHECK-SVE2SHA3-2048-DAG: "-vscale_range_min" "16" "-vscale_range_max" "16"
// CHECK-SVE2SHA3-2048PLUS: "-target_features" "+neon,+v8a,+sve2-sha3,+sve,+sve2"
// CHECK-SVE2SHA3-2048PLUS: "-target_features" "+v8a,+fp-armv8,+fullfp16,+neon,+sve,+sve2-sha3,+sve2"
// CHECK-SVE2SHA3-2048PLUS-DAG: "-vscale_range_min" "16" "-vscale_range_max" "0"
// CHECK-SVE2-SCALABLE: "-target_features" "+neon,+v8a,+sve2,+sve"
// CHECK-SVE2-SCALABLE: "-target_features" "+v8a,+fp-armv8,+fullfp16,+neon,+sve,+sve2"
// CHECK-SVE2-SCALABLE-DAG: "-vscale_range_min" "1" "-vscale_range_max" "16"
16 changes: 8 additions & 8 deletions clang/test/Driver/flang/classic-flang-vscale.f95
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@
// RUN: %clang --driver-mode=flang -### -S --target=aarch64 -march=armv8-a+sve2-sha3+nosve2 %s 2>&1 | FileCheck -check-prefix=CHECK-SVE2SHA3-NOSVE2 %s
// RUN: %clang --driver-mode=flang -### -S --target=aarch64 -march=armv8-a+sve2-sha3+nosve %s 2>&1 | FileCheck -check-prefix=CHECK-SVE2SHA3-NOSVE %s

// CHECK-NEON: "-target_features" "+neon,+v8a"
// CHECK-NEON: "-target_features" "+v8a,+fp-armv8,+neon"
// CHECK-NEON-NOT: "-vscale_range_min"
// CHECK-NEON-NOT: "-vscale_range_max"
// CHECK-SVE: "-target_features" "+neon,+v8a,+sve"
// CHECK-SVE: "-target_features" "+v8a,+fp-armv8,+fullfp16,+neon,+sve"
// CHECK-SVE-DAG: "-vscale_range_min" "1" "-vscale_range_max" "16"
// CHECK-SVE2: "-target_features" "+neon,+v8a,+sve2,+sve"
// CHECK-SVE2: "-target_features" "+v8a,+fp-armv8,+fullfp16,+neon,+sve,+sve2"
// CHECK-SVE2-DAG: "-vscale_range_min" "1" "-vscale_range_max" "16"
// CHECK-SVE2SHA3: "-target_features" "+neon,+v8a,+sve2-sha3,+sve,+sve2"
// CHECK-SVE2SHA3: "-target_features" "+v8a,+fp-armv8,+fullfp16,+neon,+sve,+sve2-sha3,+sve2"
// CHECK-SVE2SHA3-DAG: "-vscale_range_min" "1" "-vscale_range_max" "16"
// CHECK-SVE-NOSVE: "-target_features" "+neon,+v8a,-sve,-sve2,-sve2-bitperm,-sve2-sha3,-sve2-aes,-sve2-sm4"
// CHECK-SVE-NOSVE: "-target_features" "+v8a,+fp-armv8,+fullfp16,+neon,-sve"
// CHECK-SVE-NOSVE-NOT: "-vscale_range_min"
// CHECK-SVE-NOSVE-NOT: "-vscale_range_max"
// CHECK-SVE2-NOSVE2SHA3: "-target_features" "+neon,+v8a,+sve2,+sve,-sve2-sha3"
// CHECK-SVE2-NOSVE2SHA3: "-target_features" "+v8a,+fp-armv8,+fullfp16,+neon,+sve,+sve2"
// CHECK-SVE2-NOSVE2SHA3-DAG: "-vscale_range_min" "1" "-vscale_range_max" "16"
// CHECK-SVE2SHA3-NOSVE2: "-target_features" "+neon,+v8a,+sve,-sve2,-sve2-bitperm,-sve2-sha3,-sve2-aes,-sve2-sm4"
// CHECK-SVE2SHA3-NOSVE2: "-target_features" "+v8a,+fp-armv8,+fullfp16,+neon,+sve,-sve2-sha3,-sve2"
// CHECK-SVE2SHA3-NOSVE2-DAG: "-vscale_range_min" "1" "-vscale_range_max" "16"
// CHECK-SVE2SHA3-NOSVE: "-target_features" "+neon,+v8a,-sve,-sve2,-sve2-bitperm,-sve2-sha3,-sve2-aes,-sve2-sm4"
// CHECK-SVE2SHA3-NOSVE: "-target_features" "+v8a,+fp-armv8,+fullfp16,+neon,-sve,-sve2-sha3,-sve2"
// CHECK-SVE2SHA3-NOSVE-NOT: "-vscale_range_min"
// CHECK-SVE2SHA3-NOSVE-NOT: "-vscale_range_max"

0 comments on commit aede9da

Please sign in to comment.