[clang] [llvm] [RISCV] Add VeeR EH1 processor definition (PR #238935)

Shawn Nematbakhsh via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 6 09:48:30 PST 2026


https://github.com/snematbakhsh updated https://github.com/llvm/llvm-project/pull/238935

>From f007759a5543c0012464887f02c7fd0e0687bf78 Mon Sep 17 00:00:00 2001
From: Shawn Nematbakhsh <shawnn at waymo.com>
Date: Thu, 29 Oct 2026 12:19:30 -0700
Subject: [PATCH 1/3] [RISCV] Add VeeR EH1 processor definition

Add -mcpu=veer-eh1 for the CHIPS Alliance VeeR EH1 (previously known as
the Western Digital SweRV EH1), a dual-issue in-order RV32IMC core:
https://github.com/chipsalliance/Cores-VeeR-EH1

Uses NoSchedModel, the scheduling model is a separate change. Tune
choices, from cycle-accurate simulation of the RTL: the RISC-V unroll
preferences (TuneNoDefaultUnroll), no load clustering (no data cache,
one load/store unit), minimum jump-table size 10 (a branch tree is
cheaper below that), and unaligned scalar memory (misaligned accesses
are split in hardware).

Assisted-by: Claude
---
 .../print-enabled-extensions/riscv-veer-eh1.c |  17 +++
 clang/test/Driver/riscv-cpus.c                |  11 ++
 .../test/Misc/target-invalid-cpu-note/riscv.c |   2 +
 llvm/docs/ReleaseNotes.md                     |   1 +
 llvm/lib/Target/RISCV/RISCVProcessors.td      |  23 ++++
 llvm/test/CodeGen/RISCV/jumptable-veer-eh1.ll | 112 ++++++++++++++++++
 llvm/test/CodeGen/RISCV/memcpy.ll             |   2 +
 7 files changed, 168 insertions(+)
 create mode 100644 clang/test/Driver/print-enabled-extensions/riscv-veer-eh1.c
 create mode 100644 llvm/test/CodeGen/RISCV/jumptable-veer-eh1.ll

diff --git a/clang/test/Driver/print-enabled-extensions/riscv-veer-eh1.c b/clang/test/Driver/print-enabled-extensions/riscv-veer-eh1.c
new file mode 100644
index 00000000000000..939d31876eb4a1
--- /dev/null
+++ b/clang/test/Driver/print-enabled-extensions/riscv-veer-eh1.c
@@ -0,0 +1,17 @@
+// REQUIRES: riscv-registered-target
+// RUN: %clang --target=riscv32 -mcpu=veer-eh1 --print-enabled-extensions | FileCheck %s
+
+// CHECK: Extensions enabled for the given RISC-V target
+// CHECK-EMPTY:
+// CHECK-NEXT:     Name                 Version   Description
+// CHECK-NEXT:     i                    2.1       'I' (Base Integer Instruction Set)
+// CHECK-NEXT:     m                    2.0       'M' (Integer Multiplication and Division)
+// CHECK-NEXT:     c                    2.0       'C' (Compressed Instructions)
+// CHECK-NEXT:     zicsr                2.0       'Zicsr' (CSRs)
+// CHECK-NEXT:     zifencei             2.0       'Zifencei' (fence.i)
+// CHECK-NEXT:     zmmul                1.0       'Zmmul' (Integer Multiplication)
+// CHECK-NEXT:     zca                  1.0       'Zca' (part of the C extension, excluding compressed floating point loads/stores)
+// CHECK-EMPTY:
+// CHECK-NEXT: Experimental extensions
+// CHECK-EMPTY:
+// CHECK-NEXT: ISA String: rv32i2p1_m2p0_c2p0_zicsr2p0_zifencei2p0_zmmul1p0_zca1p0
diff --git a/clang/test/Driver/riscv-cpus.c b/clang/test/Driver/riscv-cpus.c
index 783622d3e1f7f4..66ad8c5c64d7a5 100644
--- a/clang/test/Driver/riscv-cpus.c
+++ b/clang/test/Driver/riscv-cpus.c
@@ -532,6 +532,17 @@
 // RUN: %clang --target=riscv32 -### -c %s 2>&1 -mtune=syntacore-scr3-rv32 | FileCheck -check-prefix=MTUNE-SYNTACORE-SCR3-RV32 %s
 // MTUNE-SYNTACORE-SCR3-RV32: "-tune-cpu" "syntacore-scr3-rv32"
 
+// RUN: %clang --target=riscv32 -### -c %s 2>&1 -mcpu=veer-eh1 | FileCheck -check-prefix=MCPU-VEER-EH1 %s
+// MCPU-VEER-EH1: "-target-cpu" "veer-eh1"
+// MCPU-VEER-EH1-SAME: "-target-feature" "+m"
+// MCPU-VEER-EH1-SAME: "-target-feature" "+c"
+// MCPU-VEER-EH1-SAME: "-target-feature" "+zicsr"
+// MCPU-VEER-EH1-SAME: "-target-feature" "+zifencei"
+// MCPU-VEER-EH1-SAME: "-target-abi" "ilp32"
+
+// RUN: %clang --target=riscv32 -### -c %s 2>&1 -mtune=veer-eh1 | FileCheck -check-prefix=MTUNE-VEER-EH1 %s
+// MTUNE-VEER-EH1: "-tune-cpu" "veer-eh1"
+
 // RUN: %clang --target=riscv64 -### -c %s 2>&1 -mcpu=syntacore-scr3-rv64 | FileCheck -check-prefix=MCPU-SYNTACORE-SCR3-RV64 %s
 // MCPU-SYNTACORE-SCR3-RV64: "-target-cpu" "syntacore-scr3-rv64"
 // MCPU-SYNTACORE-SCR3-RV64-SAME: "-target-feature" "+m"
diff --git a/clang/test/Misc/target-invalid-cpu-note/riscv.c b/clang/test/Misc/target-invalid-cpu-note/riscv.c
index df13001fedf0da..8c017c4535e3b2 100644
--- a/clang/test/Misc/target-invalid-cpu-note/riscv.c
+++ b/clang/test/Misc/target-invalid-cpu-note/riscv.c
@@ -23,6 +23,7 @@
 // RISCV32-SAME: {{^}}, syntacore-scr3-rv32
 // RISCV32-SAME: {{^}}, syntacore-scr4-rv32
 // RISCV32-SAME: {{^}}, syntacore-scr5-rv32
+// RISCV32-SAME: {{^}}, veer-eh1
 // RISCV32-SAME: {{$}}
 
 // RUN: not %clang_cc1 -triple riscv64 -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix RISCV64
@@ -88,6 +89,7 @@
 // TUNE-RISCV32-SAME: {{^}}, syntacore-scr3-rv32
 // TUNE-RISCV32-SAME: {{^}}, syntacore-scr4-rv32
 // TUNE-RISCV32-SAME: {{^}}, syntacore-scr5-rv32
+// TUNE-RISCV32-SAME: {{^}}, veer-eh1
 // TUNE-RISCV32-SAME: {{^}}, andes-45-series
 // TUNE-RISCV32-SAME: {{^}}, generic
 // TUNE-RISCV32-SAME: {{^}}, generic-ooo
diff --git a/llvm/docs/ReleaseNotes.md b/llvm/docs/ReleaseNotes.md
index 73e0ad143d7008..6623f887d1f04e 100644
--- a/llvm/docs/ReleaseNotes.md
+++ b/llvm/docs/ReleaseNotes.md
@@ -396,6 +396,7 @@ Makes programs 10x faster by doing Special New Thing.
   global variant of Ascalon X without `Zvkng` and with reduced vector FP64
   throughput.
 * Removed X5 from the preserve_most register list.
+* Added `-mcpu=veer-eh1` for the CHIPS Alliance VeeR EH1 processor.
 
 ### Changes to the WebAssembly Backend
 
diff --git a/llvm/lib/Target/RISCV/RISCVProcessors.td b/llvm/lib/Target/RISCV/RISCVProcessors.td
index c6f68a58e858b0..cc005442d0babc 100644
--- a/llvm/lib/Target/RISCV/RISCVProcessors.td
+++ b/llvm/lib/Target/RISCV/RISCVProcessors.td
@@ -780,6 +780,29 @@ def TENSTORRENT_ASCALON_XG : RISCVProcessorModel<"tt-ascalon-xg",
                                                  TTAscalonXGFeatures,
                                                  TTAscalonTuneFeatures>;
 
+// VeeR EH1 raises the minimum jump-table size: a jump-table dispatch costs
+// 4 to 10 cycles more than a predicted branch tree, and branch trees stay
+// ahead up to about 10 cases even when the switch value is random.
+class VeeREH1TuneInfo : RISCVTuneInfo {
+  let MinimumJumpTableEntries = 10;
+}
+
+// VeeR EH1 has no data cache and a single load/store unit, so clustering
+// loads gains no locality and only adds register pressure. Misaligned loads
+// and stores to idempotent memory are split by the core without a trap.
+def VEER_EH1 : RISCVProcessorModel<"veer-eh1",
+                                   NoSchedModel,
+                                   [Feature32Bit,
+                                    FeatureStdExtI,
+                                    FeatureStdExtZicsr,
+                                    FeatureStdExtZifencei,
+                                    FeatureStdExtM,
+                                    FeatureStdExtC,
+                                    FeatureUnalignedScalarMem],
+                                   [TuneNoDefaultUnroll,
+                                    TuneDisableMISchedLoadClustering]>,
+               VeeREH1TuneInfo;
+
 def XIANGSHAN_NANHU : RISCVProcessorModel<"xiangshan-nanhu",
                                           XiangShanNanHuModel,
                                           [Feature64Bit,
diff --git a/llvm/test/CodeGen/RISCV/jumptable-veer-eh1.ll b/llvm/test/CodeGen/RISCV/jumptable-veer-eh1.ll
new file mode 100644
index 00000000000000..69e6f12fe7df33
--- /dev/null
+++ b/llvm/test/CodeGen/RISCV/jumptable-veer-eh1.ll
@@ -0,0 +1,112 @@
+; RUN: llc -mtriple=riscv32 -mcpu=veer-eh1 -verify-machineinstrs < %s \
+; RUN:   | FileCheck %s -check-prefix=VEER
+; RUN: llc -mtriple=riscv32 -mtune=veer-eh1 -verify-machineinstrs < %s \
+; RUN:   | FileCheck %s -check-prefix=VEER
+; RUN: llc -mtriple=riscv32 -mcpu=generic-rv32 -verify-machineinstrs < %s \
+; RUN:   | FileCheck %s -check-prefix=GENERIC
+
+; VeeR EH1 raises the minimum jump-table size to 10 entries: a dense 9-case
+; switch lowers to a branch tree, a 10-case switch still uses a jump table.
+
+define void @nine_cases(i32 signext %in, ptr %out) nounwind {
+; VEER-LABEL: nine_cases:
+; VEER-NOT:     .LJTI
+; VEER:         ret
+;
+; GENERIC-LABEL: nine_cases:
+; GENERIC:       .LJTI0_0
+entry:
+  switch i32 %in, label %exit [
+    i32 1, label %bb1
+    i32 2, label %bb2
+    i32 3, label %bb3
+    i32 4, label %bb4
+    i32 5, label %bb5
+    i32 6, label %bb6
+    i32 7, label %bb7
+    i32 8, label %bb8
+    i32 9, label %bb9
+  ]
+bb1:
+  store i32 4, ptr %out
+  br label %exit
+bb2:
+  store i32 3, ptr %out
+  br label %exit
+bb3:
+  store i32 2, ptr %out
+  br label %exit
+bb4:
+  store i32 1, ptr %out
+  br label %exit
+bb5:
+  store i32 100, ptr %out
+  br label %exit
+bb6:
+  store i32 200, ptr %out
+  br label %exit
+bb7:
+  store i32 300, ptr %out
+  br label %exit
+bb8:
+  store i32 400, ptr %out
+  br label %exit
+bb9:
+  store i32 500, ptr %out
+  br label %exit
+exit:
+  ret void
+}
+
+define void @ten_cases(i32 signext %in, ptr %out) nounwind {
+; VEER-LABEL: ten_cases:
+; VEER:         .LJTI1_0
+;
+; GENERIC-LABEL: ten_cases:
+; GENERIC:       .LJTI1_0
+entry:
+  switch i32 %in, label %exit [
+    i32 1, label %bb1
+    i32 2, label %bb2
+    i32 3, label %bb3
+    i32 4, label %bb4
+    i32 5, label %bb5
+    i32 6, label %bb6
+    i32 7, label %bb7
+    i32 8, label %bb8
+    i32 9, label %bb9
+    i32 10, label %bb10
+  ]
+bb1:
+  store i32 4, ptr %out
+  br label %exit
+bb2:
+  store i32 3, ptr %out
+  br label %exit
+bb3:
+  store i32 2, ptr %out
+  br label %exit
+bb4:
+  store i32 1, ptr %out
+  br label %exit
+bb5:
+  store i32 100, ptr %out
+  br label %exit
+bb6:
+  store i32 200, ptr %out
+  br label %exit
+bb7:
+  store i32 300, ptr %out
+  br label %exit
+bb8:
+  store i32 400, ptr %out
+  br label %exit
+bb9:
+  store i32 500, ptr %out
+  br label %exit
+bb10:
+  store i32 600, ptr %out
+  br label %exit
+exit:
+  ret void
+}
diff --git a/llvm/test/CodeGen/RISCV/memcpy.ll b/llvm/test/CodeGen/RISCV/memcpy.ll
index e2b1d0a6957a13..64b3e6d7af4d13 100644
--- a/llvm/test/CodeGen/RISCV/memcpy.ll
+++ b/llvm/test/CodeGen/RISCV/memcpy.ll
@@ -7,6 +7,8 @@
 ; RUN:   | FileCheck %s --check-prefixes=RV32-BOTH,RV32-FAST
 ; RUN: llc < %s -mtriple=riscv32 -mcpu=andes-a45 -mtune=rocket \
 ; RUN:   | FileCheck %s --check-prefixes=RV32-BOTH,RV32-FAST
+; RUN: llc < %s -mtriple=riscv32 -mcpu=veer-eh1 -mtune=rocket \
+; RUN:   | FileCheck %s --check-prefixes=RV32-BOTH,RV32-FAST
 ; RUN: llc < %s -mtriple=riscv64 -mattr=+unaligned-scalar-mem \
 ; RUN:   | FileCheck %s --check-prefixes=RV64-BOTH,RV64-FAST,RV64-UNALIGNED
 ; RUN: llc < %s -mtriple=riscv64 -mcpu=andes-ax45 -mtune=rocket \

>From 5474af159c0afa5a7026a53a50964e957eab7826 Mon Sep 17 00:00:00 2001
From: Shawn Nematbakhsh <shawnn at waymo.com>
Date: Thu, 5 Nov 2026 09:18:02 -0800
Subject: [PATCH 2/3] Move tuning to the scheduling model commit

---
 llvm/lib/Target/RISCV/RISCVProcessors.td      |  15 +--
 llvm/test/CodeGen/RISCV/jumptable-veer-eh1.ll | 112 ------------------
 2 files changed, 1 insertion(+), 126 deletions(-)
 delete mode 100644 llvm/test/CodeGen/RISCV/jumptable-veer-eh1.ll

diff --git a/llvm/lib/Target/RISCV/RISCVProcessors.td b/llvm/lib/Target/RISCV/RISCVProcessors.td
index cc005442d0babc..4d50a6ec03a3ae 100644
--- a/llvm/lib/Target/RISCV/RISCVProcessors.td
+++ b/llvm/lib/Target/RISCV/RISCVProcessors.td
@@ -780,16 +780,6 @@ def TENSTORRENT_ASCALON_XG : RISCVProcessorModel<"tt-ascalon-xg",
                                                  TTAscalonXGFeatures,
                                                  TTAscalonTuneFeatures>;
 
-// VeeR EH1 raises the minimum jump-table size: a jump-table dispatch costs
-// 4 to 10 cycles more than a predicted branch tree, and branch trees stay
-// ahead up to about 10 cases even when the switch value is random.
-class VeeREH1TuneInfo : RISCVTuneInfo {
-  let MinimumJumpTableEntries = 10;
-}
-
-// VeeR EH1 has no data cache and a single load/store unit, so clustering
-// loads gains no locality and only adds register pressure. Misaligned loads
-// and stores to idempotent memory are split by the core without a trap.
 def VEER_EH1 : RISCVProcessorModel<"veer-eh1",
                                    NoSchedModel,
                                    [Feature32Bit,
@@ -798,10 +788,7 @@ def VEER_EH1 : RISCVProcessorModel<"veer-eh1",
                                     FeatureStdExtZifencei,
                                     FeatureStdExtM,
                                     FeatureStdExtC,
-                                    FeatureUnalignedScalarMem],
-                                   [TuneNoDefaultUnroll,
-                                    TuneDisableMISchedLoadClustering]>,
-               VeeREH1TuneInfo;
+                                    FeatureUnalignedScalarMem]>;
 
 def XIANGSHAN_NANHU : RISCVProcessorModel<"xiangshan-nanhu",
                                           XiangShanNanHuModel,
diff --git a/llvm/test/CodeGen/RISCV/jumptable-veer-eh1.ll b/llvm/test/CodeGen/RISCV/jumptable-veer-eh1.ll
deleted file mode 100644
index 69e6f12fe7df33..00000000000000
--- a/llvm/test/CodeGen/RISCV/jumptable-veer-eh1.ll
+++ /dev/null
@@ -1,112 +0,0 @@
-; RUN: llc -mtriple=riscv32 -mcpu=veer-eh1 -verify-machineinstrs < %s \
-; RUN:   | FileCheck %s -check-prefix=VEER
-; RUN: llc -mtriple=riscv32 -mtune=veer-eh1 -verify-machineinstrs < %s \
-; RUN:   | FileCheck %s -check-prefix=VEER
-; RUN: llc -mtriple=riscv32 -mcpu=generic-rv32 -verify-machineinstrs < %s \
-; RUN:   | FileCheck %s -check-prefix=GENERIC
-
-; VeeR EH1 raises the minimum jump-table size to 10 entries: a dense 9-case
-; switch lowers to a branch tree, a 10-case switch still uses a jump table.
-
-define void @nine_cases(i32 signext %in, ptr %out) nounwind {
-; VEER-LABEL: nine_cases:
-; VEER-NOT:     .LJTI
-; VEER:         ret
-;
-; GENERIC-LABEL: nine_cases:
-; GENERIC:       .LJTI0_0
-entry:
-  switch i32 %in, label %exit [
-    i32 1, label %bb1
-    i32 2, label %bb2
-    i32 3, label %bb3
-    i32 4, label %bb4
-    i32 5, label %bb5
-    i32 6, label %bb6
-    i32 7, label %bb7
-    i32 8, label %bb8
-    i32 9, label %bb9
-  ]
-bb1:
-  store i32 4, ptr %out
-  br label %exit
-bb2:
-  store i32 3, ptr %out
-  br label %exit
-bb3:
-  store i32 2, ptr %out
-  br label %exit
-bb4:
-  store i32 1, ptr %out
-  br label %exit
-bb5:
-  store i32 100, ptr %out
-  br label %exit
-bb6:
-  store i32 200, ptr %out
-  br label %exit
-bb7:
-  store i32 300, ptr %out
-  br label %exit
-bb8:
-  store i32 400, ptr %out
-  br label %exit
-bb9:
-  store i32 500, ptr %out
-  br label %exit
-exit:
-  ret void
-}
-
-define void @ten_cases(i32 signext %in, ptr %out) nounwind {
-; VEER-LABEL: ten_cases:
-; VEER:         .LJTI1_0
-;
-; GENERIC-LABEL: ten_cases:
-; GENERIC:       .LJTI1_0
-entry:
-  switch i32 %in, label %exit [
-    i32 1, label %bb1
-    i32 2, label %bb2
-    i32 3, label %bb3
-    i32 4, label %bb4
-    i32 5, label %bb5
-    i32 6, label %bb6
-    i32 7, label %bb7
-    i32 8, label %bb8
-    i32 9, label %bb9
-    i32 10, label %bb10
-  ]
-bb1:
-  store i32 4, ptr %out
-  br label %exit
-bb2:
-  store i32 3, ptr %out
-  br label %exit
-bb3:
-  store i32 2, ptr %out
-  br label %exit
-bb4:
-  store i32 1, ptr %out
-  br label %exit
-bb5:
-  store i32 100, ptr %out
-  br label %exit
-bb6:
-  store i32 200, ptr %out
-  br label %exit
-bb7:
-  store i32 300, ptr %out
-  br label %exit
-bb8:
-  store i32 400, ptr %out
-  br label %exit
-bb9:
-  store i32 500, ptr %out
-  br label %exit
-bb10:
-  store i32 600, ptr %out
-  br label %exit
-exit:
-  ret void
-}

>From d0bb37330ada37f2eee2ccadc77d6e5122a08dd3 Mon Sep 17 00:00:00 2001
From: Shawn Nematbakhsh <shawnn at waymo.com>
Date: Fri, 6 Nov 2026 09:35:19 -0800
Subject: [PATCH 3/3] Rename to chipsalliance-veer-eh1

---
 ...r-eh1.c => riscv-chipsalliance-veer-eh1.c} |  2 +-
 clang/test/Driver/riscv-cpus.c                | 20 +++++++++----------
 .../test/Misc/target-invalid-cpu-note/riscv.c |  4 ++--
 llvm/docs/ReleaseNotes.md                     |  3 ++-
 llvm/lib/Target/RISCV/RISCVProcessors.td      | 18 ++++++++---------
 llvm/test/CodeGen/RISCV/memcpy.ll             |  2 +-
 6 files changed, 25 insertions(+), 24 deletions(-)
 rename clang/test/Driver/print-enabled-extensions/{riscv-veer-eh1.c => riscv-chipsalliance-veer-eh1.c} (90%)

diff --git a/clang/test/Driver/print-enabled-extensions/riscv-veer-eh1.c b/clang/test/Driver/print-enabled-extensions/riscv-chipsalliance-veer-eh1.c
similarity index 90%
rename from clang/test/Driver/print-enabled-extensions/riscv-veer-eh1.c
rename to clang/test/Driver/print-enabled-extensions/riscv-chipsalliance-veer-eh1.c
index 939d31876eb4a1..0040227de577b3 100644
--- a/clang/test/Driver/print-enabled-extensions/riscv-veer-eh1.c
+++ b/clang/test/Driver/print-enabled-extensions/riscv-chipsalliance-veer-eh1.c
@@ -1,5 +1,5 @@
 // REQUIRES: riscv-registered-target
-// RUN: %clang --target=riscv32 -mcpu=veer-eh1 --print-enabled-extensions | FileCheck %s
+// RUN: %clang --target=riscv32 -mcpu=chipsalliance-veer-eh1 --print-enabled-extensions | FileCheck %s
 
 // CHECK: Extensions enabled for the given RISC-V target
 // CHECK-EMPTY:
diff --git a/clang/test/Driver/riscv-cpus.c b/clang/test/Driver/riscv-cpus.c
index 66ad8c5c64d7a5..0e544f53859f9f 100644
--- a/clang/test/Driver/riscv-cpus.c
+++ b/clang/test/Driver/riscv-cpus.c
@@ -532,16 +532,16 @@
 // RUN: %clang --target=riscv32 -### -c %s 2>&1 -mtune=syntacore-scr3-rv32 | FileCheck -check-prefix=MTUNE-SYNTACORE-SCR3-RV32 %s
 // MTUNE-SYNTACORE-SCR3-RV32: "-tune-cpu" "syntacore-scr3-rv32"
 
-// RUN: %clang --target=riscv32 -### -c %s 2>&1 -mcpu=veer-eh1 | FileCheck -check-prefix=MCPU-VEER-EH1 %s
-// MCPU-VEER-EH1: "-target-cpu" "veer-eh1"
-// MCPU-VEER-EH1-SAME: "-target-feature" "+m"
-// MCPU-VEER-EH1-SAME: "-target-feature" "+c"
-// MCPU-VEER-EH1-SAME: "-target-feature" "+zicsr"
-// MCPU-VEER-EH1-SAME: "-target-feature" "+zifencei"
-// MCPU-VEER-EH1-SAME: "-target-abi" "ilp32"
-
-// RUN: %clang --target=riscv32 -### -c %s 2>&1 -mtune=veer-eh1 | FileCheck -check-prefix=MTUNE-VEER-EH1 %s
-// MTUNE-VEER-EH1: "-tune-cpu" "veer-eh1"
+// RUN: %clang --target=riscv32 -### -c %s 2>&1 -mcpu=chipsalliance-veer-eh1 | FileCheck -check-prefix=MCPU-CHIPSALLIANCE-VEER-EH1 %s
+// MCPU-CHIPSALLIANCE-VEER-EH1: "-target-cpu" "chipsalliance-veer-eh1"
+// MCPU-CHIPSALLIANCE-VEER-EH1-SAME: "-target-feature" "+m"
+// MCPU-CHIPSALLIANCE-VEER-EH1-SAME: "-target-feature" "+c"
+// MCPU-CHIPSALLIANCE-VEER-EH1-SAME: "-target-feature" "+zicsr"
+// MCPU-CHIPSALLIANCE-VEER-EH1-SAME: "-target-feature" "+zifencei"
+// MCPU-CHIPSALLIANCE-VEER-EH1-SAME: "-target-abi" "ilp32"
+
+// RUN: %clang --target=riscv32 -### -c %s 2>&1 -mtune=chipsalliance-veer-eh1 | FileCheck -check-prefix=MTUNE-CHIPSALLIANCE-VEER-EH1 %s
+// MTUNE-CHIPSALLIANCE-VEER-EH1: "-tune-cpu" "chipsalliance-veer-eh1"
 
 // RUN: %clang --target=riscv64 -### -c %s 2>&1 -mcpu=syntacore-scr3-rv64 | FileCheck -check-prefix=MCPU-SYNTACORE-SCR3-RV64 %s
 // MCPU-SYNTACORE-SCR3-RV64: "-target-cpu" "syntacore-scr3-rv64"
diff --git a/clang/test/Misc/target-invalid-cpu-note/riscv.c b/clang/test/Misc/target-invalid-cpu-note/riscv.c
index 8c017c4535e3b2..07b5d7c58d72c6 100644
--- a/clang/test/Misc/target-invalid-cpu-note/riscv.c
+++ b/clang/test/Misc/target-invalid-cpu-note/riscv.c
@@ -8,6 +8,7 @@
 // RISCV32-SAME: {{^}} andes-a25
 // RISCV32-SAME: {{^}}, andes-a45
 // RISCV32-SAME: {{^}}, andes-n45
+// RISCV32-SAME: {{^}}, chipsalliance-veer-eh1
 // RISCV32-SAME: {{^}}, generic-rv32
 // RISCV32-SAME: {{^}}, rocket-rv32
 // RISCV32-SAME: {{^}}, rp2350-hazard3
@@ -23,7 +24,6 @@
 // RISCV32-SAME: {{^}}, syntacore-scr3-rv32
 // RISCV32-SAME: {{^}}, syntacore-scr4-rv32
 // RISCV32-SAME: {{^}}, syntacore-scr5-rv32
-// RISCV32-SAME: {{^}}, veer-eh1
 // RISCV32-SAME: {{$}}
 
 // RUN: not %clang_cc1 -triple riscv64 -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix RISCV64
@@ -74,6 +74,7 @@
 // TUNE-RISCV32-SAME: {{^}} andes-a25
 // TUNE-RISCV32-SAME: {{^}}, andes-a45
 // TUNE-RISCV32-SAME: {{^}}, andes-n45
+// TUNE-RISCV32-SAME: {{^}}, chipsalliance-veer-eh1
 // TUNE-RISCV32-SAME: {{^}}, generic-rv32
 // TUNE-RISCV32-SAME: {{^}}, rocket-rv32
 // TUNE-RISCV32-SAME: {{^}}, rp2350-hazard3
@@ -89,7 +90,6 @@
 // TUNE-RISCV32-SAME: {{^}}, syntacore-scr3-rv32
 // TUNE-RISCV32-SAME: {{^}}, syntacore-scr4-rv32
 // TUNE-RISCV32-SAME: {{^}}, syntacore-scr5-rv32
-// TUNE-RISCV32-SAME: {{^}}, veer-eh1
 // TUNE-RISCV32-SAME: {{^}}, andes-45-series
 // TUNE-RISCV32-SAME: {{^}}, generic
 // TUNE-RISCV32-SAME: {{^}}, generic-ooo
diff --git a/llvm/docs/ReleaseNotes.md b/llvm/docs/ReleaseNotes.md
index 6623f887d1f04e..64ec5e8e0f30ee 100644
--- a/llvm/docs/ReleaseNotes.md
+++ b/llvm/docs/ReleaseNotes.md
@@ -396,7 +396,8 @@ Makes programs 10x faster by doing Special New Thing.
   global variant of Ascalon X without `Zvkng` and with reduced vector FP64
   throughput.
 * Removed X5 from the preserve_most register list.
-* Added `-mcpu=veer-eh1` for the CHIPS Alliance VeeR EH1 processor.
+* Added `-mcpu=chipsalliance-veer-eh1` for the CHIPS Alliance VeeR EH1
+  processor.
 
 ### Changes to the WebAssembly Backend
 
diff --git a/llvm/lib/Target/RISCV/RISCVProcessors.td b/llvm/lib/Target/RISCV/RISCVProcessors.td
index 4d50a6ec03a3ae..22b478e7fed72a 100644
--- a/llvm/lib/Target/RISCV/RISCVProcessors.td
+++ b/llvm/lib/Target/RISCV/RISCVProcessors.td
@@ -780,15 +780,15 @@ def TENSTORRENT_ASCALON_XG : RISCVProcessorModel<"tt-ascalon-xg",
                                                  TTAscalonXGFeatures,
                                                  TTAscalonTuneFeatures>;
 
-def VEER_EH1 : RISCVProcessorModel<"veer-eh1",
-                                   NoSchedModel,
-                                   [Feature32Bit,
-                                    FeatureStdExtI,
-                                    FeatureStdExtZicsr,
-                                    FeatureStdExtZifencei,
-                                    FeatureStdExtM,
-                                    FeatureStdExtC,
-                                    FeatureUnalignedScalarMem]>;
+def CHIPSALLIANCE_VEER_EH1 : RISCVProcessorModel<"chipsalliance-veer-eh1",
+                                                 NoSchedModel,
+                                                 [Feature32Bit,
+                                                  FeatureStdExtI,
+                                                  FeatureStdExtZicsr,
+                                                  FeatureStdExtZifencei,
+                                                  FeatureStdExtM,
+                                                  FeatureStdExtC,
+                                                  FeatureUnalignedScalarMem]>;
 
 def XIANGSHAN_NANHU : RISCVProcessorModel<"xiangshan-nanhu",
                                           XiangShanNanHuModel,
diff --git a/llvm/test/CodeGen/RISCV/memcpy.ll b/llvm/test/CodeGen/RISCV/memcpy.ll
index 64b3e6d7af4d13..7f141b732a5ffa 100644
--- a/llvm/test/CodeGen/RISCV/memcpy.ll
+++ b/llvm/test/CodeGen/RISCV/memcpy.ll
@@ -7,7 +7,7 @@
 ; RUN:   | FileCheck %s --check-prefixes=RV32-BOTH,RV32-FAST
 ; RUN: llc < %s -mtriple=riscv32 -mcpu=andes-a45 -mtune=rocket \
 ; RUN:   | FileCheck %s --check-prefixes=RV32-BOTH,RV32-FAST
-; RUN: llc < %s -mtriple=riscv32 -mcpu=veer-eh1 -mtune=rocket \
+; RUN: llc < %s -mtriple=riscv32 -mcpu=chipsalliance-veer-eh1 -mtune=rocket \
 ; RUN:   | FileCheck %s --check-prefixes=RV32-BOTH,RV32-FAST
 ; RUN: llc < %s -mtriple=riscv64 -mattr=+unaligned-scalar-mem \
 ; RUN:   | FileCheck %s --check-prefixes=RV64-BOTH,RV64-FAST,RV64-UNALIGNED



More information about the cfe-commits mailing list