From 81bd5bb795ee18de01b2765e2c5b9aa3ede5c551 Mon Sep 17 00:00:00 2001 From: "Kazushi (Jam) Marukawa" Date: Sun, 27 Dec 2020 23:28:20 +0900 Subject: [PATCH] [VE] Change default CPU name to "generic" Change default CPU name of SX-Aurora VE from "ve" to "generic" similar to other architectures. Reviewed By: simoll Differential Revision: https://reviews.llvm.org/D93836 --- lib/Target/VE/MCTargetDesc/VEMCTargetDesc.cpp | 2 +- lib/Target/VE/VE.td | 2 +- lib/Target/VE/VESubtarget.cpp | 2 +- test/CodeGen/VE/Scalar/cpu.ll | 5 +++++ 4 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 test/CodeGen/VE/Scalar/cpu.ll diff --git a/lib/Target/VE/MCTargetDesc/VEMCTargetDesc.cpp b/lib/Target/VE/MCTargetDesc/VEMCTargetDesc.cpp index 239a89812e4..4c480c05027 100644 --- a/lib/Target/VE/MCTargetDesc/VEMCTargetDesc.cpp +++ b/lib/Target/VE/MCTargetDesc/VEMCTargetDesc.cpp @@ -56,7 +56,7 @@ static MCRegisterInfo *createVEMCRegisterInfo(const Triple &TT) { static MCSubtargetInfo *createVEMCSubtargetInfo(const Triple &TT, StringRef CPU, StringRef FS) { if (CPU.empty()) - CPU = "ve"; + CPU = "generic"; return createVEMCSubtargetInfoImpl(TT, CPU, /*TuneCPU=*/CPU, FS); } diff --git a/lib/Target/VE/VE.td b/lib/Target/VE/VE.td index a2c0ba04ada..9e8adcd4207 100644 --- a/lib/Target/VE/VE.td +++ b/lib/Target/VE/VE.td @@ -46,7 +46,7 @@ def VEAsmParser : AsmParser { class Proc Features> : Processor; -def : Proc<"ve", []>; +def : Proc<"generic", []>; //===----------------------------------------------------------------------===// // Declare the target which we are implementing diff --git a/lib/Target/VE/VESubtarget.cpp b/lib/Target/VE/VESubtarget.cpp index 3406a613e89..daa6cfb8aa8 100644 --- a/lib/Target/VE/VESubtarget.cpp +++ b/lib/Target/VE/VESubtarget.cpp @@ -33,7 +33,7 @@ VESubtarget &VESubtarget::initializeSubtargetDependencies(StringRef CPU, // Determine default and user specified characteristics std::string CPUName = std::string(CPU); if (CPUName.empty()) - CPUName = "ve"; + CPUName = "generic"; // Parse features string. ParseSubtargetFeatures(CPUName, /*TuneCPU=*/CPU, FS); diff --git a/test/CodeGen/VE/Scalar/cpu.ll b/test/CodeGen/VE/Scalar/cpu.ll new file mode 100644 index 00000000000..7586a38f9f5 --- /dev/null +++ b/test/CodeGen/VE/Scalar/cpu.ll @@ -0,0 +1,5 @@ +; RUN: llc -mtriple=ve -mcpu=help < %s 2>&1 | FileCheck %s + +; CHECK: Available CPUs for this target: +; CHECK-EMPTY: +; CHECK-NEXT: generic - Select the generic processor.