[llvm] Add "avoidmuls" to STAR-MC1 also (PR #123706)
Albert Huang via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 21 00:06:03 PST 2025
https://github.com/AlbertHuang-CPU created https://github.com/llvm/llvm-project/pull/123706
PR #112540 as the reference.
>From 0fc4fbe6c4ca1b9dc3d4ab22579dd1b41d536c15 Mon Sep 17 00:00:00 2001
From: Albert Huang <Albert.huang at armchina.com>
Date: Tue, 21 Jan 2025 15:57:49 +0800
Subject: [PATCH 1/2] Update ARMProcessors.td
---
llvm/lib/Target/ARM/ARMProcessors.td | 1 +
1 file changed, 1 insertion(+)
diff --git a/llvm/lib/Target/ARM/ARMProcessors.td b/llvm/lib/Target/ARM/ARMProcessors.td
index 213b104bcfdb2f..7453727a7cff0c 100644
--- a/llvm/lib/Target/ARM/ARMProcessors.td
+++ b/llvm/lib/Target/ARM/ARMProcessors.td
@@ -377,6 +377,7 @@ def : ProcessorModel<"star-mc1", CortexM4Model, [ARMv8mMainline,
FeatureHasSlowFPVFMx,
FeatureUseMISched,
FeatureHasNoBranchPredictor,
+ FeatureAvoidMULS,
FeatureFixCMSE_CVE_2021_35465]>;
def : ProcessorModel<"cortex-m35p", CortexM4Model, [ARMv8mMainline,
>From 0d1c21486212714b3cf2d153595e547d2fcd112f Mon Sep 17 00:00:00 2001
From: Albert Huang <Albert.huang at armchina.com>
Date: Tue, 21 Jan 2025 16:01:16 +0800
Subject: [PATCH 2/2] Update avoidmuls.mir
---
llvm/test/CodeGen/Thumb2/avoidmuls.mir | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/llvm/test/CodeGen/Thumb2/avoidmuls.mir b/llvm/test/CodeGen/Thumb2/avoidmuls.mir
index 865152068fdf7f..7bfa4b90600637 100644
--- a/llvm/test/CodeGen/Thumb2/avoidmuls.mir
+++ b/llvm/test/CodeGen/Thumb2/avoidmuls.mir
@@ -1,4 +1,5 @@
# RUN: llc -mtriple=thumbv7m-none-eabi -mcpu=cortex-m33 -run-pass=thumb2-reduce-size %s -o - | FileCheck %s --check-prefix=MUL
+# RUN: llc -mtriple=thumbv7m-none-eabi -mcpu=star-mc1 -run-pass=thumb2-reduce-size %s -o - | FileCheck %s --check-prefix=MUL
# RUN: llc -mtriple=thumbv7m-none-eabi --run-pass=thumb2-reduce-size %s -o - | FileCheck %s --check-prefix=MULS
---
@@ -17,4 +18,4 @@ body: |
# MULS-LABEL: test
# MULS: tMUL
-# MULS-NOT: t2MUL
\ No newline at end of file
+# MULS-NOT: t2MUL
More information about the llvm-commits
mailing list