[llvm] Add "avoidmuls" to STAR-MC1 also (PR #123706)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 21 00:07:03 PST 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-backend-arm

Author: Albert Huang (AlbertHuang-CPU)

<details>
<summary>Changes</summary>

PR #<!-- -->112540 as the reference.

---
Full diff: https://github.com/llvm/llvm-project/pull/123706.diff


2 Files Affected:

- (modified) llvm/lib/Target/ARM/ARMProcessors.td (+1) 
- (modified) llvm/test/CodeGen/Thumb2/avoidmuls.mir (+2-1) 


``````````diff
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,
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

``````````

</details>


https://github.com/llvm/llvm-project/pull/123706


More information about the llvm-commits mailing list