[llvm] Fix mayStore flag of PUSH instructions for MSP430 (PR #73377)

Yida Zhang via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 24 21:31:10 PST 2023


https://github.com/zyd2001 created https://github.com/llvm/llvm-project/pull/73377

A bug in MSP430InstrInfo.td.

>From 07d6f0077badc47c291ac5e9113858edaad9554f Mon Sep 17 00:00:00 2001
From: Yida Zhang <zyd200101 at outlook.com>
Date: Sat, 25 Nov 2023 00:27:29 -0500
Subject: [PATCH] fix mayStore for PUSH instruction

---
 llvm/lib/Target/MSP430/MSP430InstrInfo.td | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/llvm/lib/Target/MSP430/MSP430InstrInfo.td b/llvm/lib/Target/MSP430/MSP430InstrInfo.td
index 0ff9763e4c93e18..714a5d4f5116554 100644
--- a/llvm/lib/Target/MSP430/MSP430InstrInfo.td
+++ b/llvm/lib/Target/MSP430/MSP430InstrInfo.td
@@ -305,12 +305,13 @@ def POP16r   : IForm16<0b0100, DstReg, SrcPostInc, 2,
   let rs = 1;
 }
 
-let mayStore = 1 in
+let mayStore = 1 in {
 def PUSH8r :  II8r<0b100, (outs), (ins GR8:$rs), "push.b\t$rs", []>;
 def PUSH16r : II16r<0b100, (outs), (ins GR16:$rs), "push\t$rs", []>;
 def PUSH16c : II16c<0b100, (outs), (ins cg16imm:$imm), "push\t$imm", []>;
 def PUSH16i : II16i<0b100, (outs), (ins i16imm:$imm), "push\t$imm", []>;
 }
+}
 
 //===----------------------------------------------------------------------===//
 // Move Instructions



More information about the llvm-commits mailing list