Skip to content

Commit 197db74

Browse files
committed
FPU Feature Collection and Test Update
This is after comments to update the implementation to better reflect the state of affairs.
1 parent 98ae944 commit 197db74

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

clang/lib/Driver/ToolChains/Arch/ARM.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -685,8 +685,7 @@ llvm::ARM::FPUKind arm::getARMTargetFeatures(const Driver &D,
685685
getARMSubArchVersionNumber(Triple) >= 7) {
686686
FPUKind = llvm::ARM::parseFPU("neon");
687687
(void)llvm::ARM::getFPUFeatures(FPUKind, Features);
688-
} else if ((!Generic) ||
689-
(Generic && getARMSubArchVersionNumber(Triple) >= 7)) {
688+
} else {
690689
llvm::ARM::ArchKind ArchKind =
691690
arm::getLLVMArchKindForARM(CPU, ArchName, Triple);
692691
FPUKind = llvm::ARM::getDefaultFPU(CPU, ArchKind);

clang/test/Driver/arm-fpu-selection.s

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44
// used and tested for VFP and NEON Support
55

66
// RUN: %clang -target arm-none-eabi -mcpu=cortex-r52 -c %s -o /dev/null | count 0
7-
// RUN: %clang -target arm-none-eabi -mcpu=cortex-r52 -c %s -o /dev/null -### 2> %t | FileCheck --check-prefix=CHECK-TARGET-FEATURES < %t %s
7+
// RUN: %clang -target arm-none-eabi -mcpu=cortex-r52 -c %s -o /dev/null -### 2>&1 | FileCheck --check-prefix=CHECK-TARGET-FEATURES %s
88

99
// Check that NEON and VFPV5 have been activated when using Cortex-R52 when using cc1as
10-
// CHECK-TARGET-FEATURES: "-target-feature" "+neon"
11-
// CHECK-TARGET-FEATURES: "-target-feature" "+fp-armv8"
1210
// CHECK-TARGET-FEATURES: "-target-feature" "+vfp2sp"
1311
// CHECK-TARGET-FEATURES: "-target-feature" "+vfp3"
12+
// CHECK-TARGET-FEATURES: "-target-feature" "+fp-armv8"
1413
// CHECK-TARGET-FEATURES: "-target-feature" "+fp-armv8d16"
1514
// CHECK-TARGET-FEATURES: "-target-feature" "+fp-armv8d16sp"
1615
// CHECK-TARGET-FEATURES: "-target-feature" "+fp-armv8sp"
16+
// CHECK-TARGET-FEATURES: "-target-feature" "+neon"
1717

1818
vadd.f32 s0, s1, s2
1919
vadd.f64 d0, d1, d2

0 commit comments

Comments
 (0)