[llvm-branch-commits] [llvm] release/22.x: [Hexagon] Add missing early architecture features to V81 processor (#183499) (PR #184700)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Mar 4 15:10:14 PST 2026
https://github.com/llvmbot created https://github.com/llvm/llvm-project/pull/184700
Backport 6f736e2cd9933aed1c8b72f2fe370f7d60bd3709
Requested by: @androm3da
>From 6952ced55db2a4c06ac905ea8a2b2520c7dd3695 Mon Sep 17 00:00:00 2001
From: pkarveti <quic_pkarveti at quicinc.com>
Date: Thu, 26 Feb 2026 20:55:18 +0530
Subject: [PATCH] [Hexagon] Add missing early architecture features to V81
processor (#183499)
V81 was missing ArchV5, ArchV55, ArchV60, and ArchV62 in its feature
list, causing instructions requiring these architecture versions to fail
during compilation.
(cherry picked from commit 6f736e2cd9933aed1c8b72f2fe370f7d60bd3709)
---
llvm/lib/Target/Hexagon/Hexagon.td | 4 ++--
.../CodeGen/Hexagon/v81-early-arch-features.ll | 16 ++++++++++++++++
2 files changed, 18 insertions(+), 2 deletions(-)
create mode 100644 llvm/test/CodeGen/Hexagon/v81-early-arch-features.ll
diff --git a/llvm/lib/Target/Hexagon/Hexagon.td b/llvm/lib/Target/Hexagon/Hexagon.td
index 17c72c393b432..6532cbd085c2d 100644
--- a/llvm/lib/Target/Hexagon/Hexagon.td
+++ b/llvm/lib/Target/Hexagon/Hexagon.td
@@ -499,8 +499,8 @@ def : Proc<"hexagonv79", HexagonModelV79,
FeatureCompound, FeatureDuplex, FeatureMemNoShuf, FeatureMemops,
FeatureNVJ, FeatureNVS, FeaturePackets, FeatureSmallData]>;
def : Proc<"hexagonv81", HexagonModelV81,
- [ArchV65, ArchV66, ArchV67, ArchV68, ArchV69, ArchV71, ArchV73,
- ArchV75, ArchV79, ArchV81,
+ [ArchV5, ArchV55, ArchV60, ArchV62, ArchV65, ArchV66, ArchV67,
+ ArchV68, ArchV69, ArchV71, ArchV73, ArchV75, ArchV79, ArchV81,
FeatureCompound, FeatureDuplex, FeatureMemNoShuf, FeatureMemops,
FeatureNVJ, FeatureNVS, FeaturePackets, FeatureSmallData]>;
diff --git a/llvm/test/CodeGen/Hexagon/v81-early-arch-features.ll b/llvm/test/CodeGen/Hexagon/v81-early-arch-features.ll
new file mode 100644
index 0000000000000..697374ab2c026
--- /dev/null
+++ b/llvm/test/CodeGen/Hexagon/v81-early-arch-features.ll
@@ -0,0 +1,16 @@
+; RUN: llc -mtriple=hexagon -mcpu=hexagonv81 -mattr=+hvxv81,+hvx-length128b,+hvx-ieee-fp,-packets < %s | FileCheck %s
+
+; Before the fix, V81 processor definition in Hexagon.td was missing early
+; architecture features (ArchV5, ArchV55, ArchV60, ArchV62), causing compilation
+; to fail with:
+; "fatal error: Attempting to emit S6_vsplatrbp instruction but the
+; Feature_HasV62 predicate(s) are not met"
+
+; CHECK-LABEL: test_hvx_v16i8_return:
+; CHECK: vsplatb
+
+define <16 x i8> @test_hvx_v16i8_return() {
+entry:
+ ret <16 x i8> zeroinitializer
+}
+
More information about the llvm-branch-commits
mailing list