[llvm] [XCore] Use `softPromoteHalfType` (PR #175142)
Trevor Gross via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 9 01:18:51 PST 2026
https://github.com/tgross35 created https://github.com/llvm/llvm-project/pull/175142
Follow suite from other targets.
Fixes the XCore portion of https://github.com/llvm/llvm-project/issues/97975 Fixes the XCore portion of https://github.com/llvm/llvm-project/issues/97981
>From 1039a2989d236b327c00f389dce314c22e3e6ffe Mon Sep 17 00:00:00 2001
From: Trevor Gross <tg at trevorgross.com>
Date: Thu, 8 Jan 2026 23:06:32 -0600
Subject: [PATCH] [XCore] Use `softPromoteHalfType`
Follow suite from other targets.
Fixes the XCore portion of https://github.com/llvm/llvm-project/issues/97975
Fixes the XCore portion of https://github.com/llvm/llvm-project/issues/97981
---
llvm/lib/Target/XCore/XCoreISelLowering.h | 2 ++
llvm/test/CodeGen/Generic/half-op.ll | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/llvm/lib/Target/XCore/XCoreISelLowering.h b/llvm/lib/Target/XCore/XCoreISelLowering.h
index bad6588cad740..46e96315b9a58 100644
--- a/llvm/lib/Target/XCore/XCoreISelLowering.h
+++ b/llvm/lib/Target/XCore/XCoreISelLowering.h
@@ -72,6 +72,8 @@ namespace llvm {
return XCore::R1;
}
+ bool softPromoteHalfType() const override { return true; }
+
private:
const TargetMachine &TM;
const XCoreSubtarget &Subtarget;
diff --git a/llvm/test/CodeGen/Generic/half-op.ll b/llvm/test/CodeGen/Generic/half-op.ll
index f08c71b187eb1..a8b3f4b979932 100644
--- a/llvm/test/CodeGen/Generic/half-op.ll
+++ b/llvm/test/CodeGen/Generic/half-op.ll
@@ -41,7 +41,7 @@
; RUN: %if x86-registered-target %{ llc %s -o - -mtriple=i686-unknown-linux-gnu | FileCheck %s --check-prefixes=ALL,CHECK-NEG-ABS,CHECK-COPYSIGN,CHECK-FMA %}
; RUN: %if x86-registered-target %{ llc %s -o - -mtriple=x86_64-pc-windows-msvc | FileCheck %s --check-prefixes=ALL,CHECK-NEG-ABS,CHECK-COPYSIGN,CHECK-FMA %}
; RUN: %if x86-registered-target %{ llc %s -o - -mtriple=x86_64-unknown-linux-gnu | FileCheck %s --check-prefixes=ALL,CHECK-NEG-ABS,CHECK-COPYSIGN,CHECK-FMA %}
-; RUN: %if xcore-registered-target %{ llc %s -o - -mtriple=xcore-unknown-unknown | FileCheck %s --check-prefixes=ALL,BAD-NEG-ABS,BAD-COPYSIGN,BAD-FMA %}
+; RUN: %if xcore-registered-target %{ llc %s -o - -mtriple=xcore-unknown-unknown | FileCheck %s --check-prefixes=ALL,CHECK-NEG-ABS,CHECK-COPYSIGN,CHECK-FMA %}
; RUN: %if xtensa-registered-target %{ llc %s -o - -mtriple=xtensa-none-elf | FileCheck %s --check-prefixes=ALL,BAD-NEG-ABS,BAD-COPYSIGN,CHECK-FMA %}
; Note that arm64ec labels are quoted, hence the `{{"?}}:`.
More information about the llvm-commits
mailing list