Skip to content

Commit 53467c3

Browse files
committed
Revert "Revert "Enable MSA feature by default for MIPS cpus i6400 and i6500""
This reverts commit dad1337. keeping MSA enabled by default for cpu i6400 and i6500
1 parent dad1337 commit 53467c3

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,12 @@ void mips::getMIPSTargetFeatures(const Driver &D, const llvm::Triple &Triple,
255255
D.Diag(diag::err_drv_unsupported_noabicalls_pic);
256256
}
257257

258+
if (CPUName == "i6500" || CPUName == "i6400") {
259+
// MIPS cpu i6400 and i6500 support MSA (Mips SIMD Architecture)
260+
// by default.
261+
Features.push_back("+msa");
262+
}
263+
258264
if (!UseAbiCalls)
259265
Features.push_back("+noabicalls");
260266
else

clang/test/Driver/mips-cpus.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// Check target CPUs are correctly passed.
22

3-
// RUN: %clang --target=mips64 -### -c %s 2>&1 -mcpu=i6400 -mmsa | FileCheck -check-prefix=MCPU-I6400 %s
3+
// RUN: %clang --target=mips64 -### -c %s 2>&1 -mcpu=i6400 | FileCheck -check-prefix=MCPU-I6400 %s
44
// MCPU-I6400: "-target-cpu" "i6400"
5-
// MCPU-I6400-SAME: "-target-feature" "+msa"
5+
// MCPU-I6400: "-target-feature" "+msa" "-target-feature" "-noabicalls"
66

7-
// RUN: %clang --target=mips64 -### -c %s 2>&1 -mcpu=i6500 -mmsa | FileCheck -check-prefix=MCPU-I6500 %s
7+
// RUN: %clang --target=mips64 -### -c %s 2>&1 -mcpu=i6500 | FileCheck -check-prefix=MCPU-I6500 %s
88
// MCPU-I6500: "-target-cpu" "i6500"
9-
// MCPU-I6500-SAME: "-target-feature" "+msa"
9+
// MCPU-I6500: "-target-feature" "+msa" "-target-feature" "-noabicalls"

0 commit comments

Comments
 (0)