[llvm] [CSKY] Don't emit `__multi3` on 32-bit CSKY (PR #69732)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 20 08:56:38 PDT 2023
https://github.com/Dirreke updated https://github.com/llvm/llvm-project/pull/69732
>From c2f3e3a0305fa45e2e8b8d1572ab6c5bc910374d Mon Sep 17 00:00:00 2001
From: Dirreck <mingyang_ge at 163.com>
Date: Fri, 20 Oct 2023 22:58:13 +0800
Subject: [PATCH 1/2] disable `_multi3` for 32-bit target
---
llvm/lib/Target/CSKY/CSKYISelLowering.cpp | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/llvm/lib/Target/CSKY/CSKYISelLowering.cpp b/llvm/lib/Target/CSKY/CSKYISelLowering.cpp
index e3b4a2dc048ab20..9cb7bd7058f9749 100644
--- a/llvm/lib/Target/CSKY/CSKYISelLowering.cpp
+++ b/llvm/lib/Target/CSKY/CSKYISelLowering.cpp
@@ -109,6 +109,14 @@ CSKYTargetLowering::CSKYTargetLowering(const TargetMachine &TM,
setOperationAction(ISD::ATOMIC_FENCE, MVT::Other, Expand);
+ // These libcalls are not available in 32-bit.
+ setLibcallName(RTLIB::SHL_I128, nullptr);
+ setLibcallName(RTLIB::SRL_I128, nullptr);
+ setLibcallName(RTLIB::SRA_I128, nullptr);
+ setLibcallName(RTLIB::MUL_I128, nullptr);
+ setLibcallName(RTLIB::MULO_I64, nullptr);
+ setLibcallName(RTLIB::MULO_I128, nullptr);
+
// Float
ISD::CondCode FPCCToExtend[] = {
>From 6454411d95411984b10e61b90fdbf21fa08dc844 Mon Sep 17 00:00:00 2001
From: Dirreck <mingyang_ge at 163.com>
Date: Fri, 20 Oct 2023 23:56:29 +0800
Subject: [PATCH 2/2] Update CSKYISelLowering.cpp
---
llvm/lib/Target/CSKY/CSKYISelLowering.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/lib/Target/CSKY/CSKYISelLowering.cpp b/llvm/lib/Target/CSKY/CSKYISelLowering.cpp
index 9cb7bd7058f9749..ddad1509f0fd730 100644
--- a/llvm/lib/Target/CSKY/CSKYISelLowering.cpp
+++ b/llvm/lib/Target/CSKY/CSKYISelLowering.cpp
@@ -116,7 +116,7 @@ CSKYTargetLowering::CSKYTargetLowering(const TargetMachine &TM,
setLibcallName(RTLIB::MUL_I128, nullptr);
setLibcallName(RTLIB::MULO_I64, nullptr);
setLibcallName(RTLIB::MULO_I128, nullptr);
-
+
// Float
ISD::CondCode FPCCToExtend[] = {
More information about the llvm-commits
mailing list