public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-7678] target/110220: Set JUMP_LABEL and LABEL_NUSES of new branch insn generated by
@ 2023-08-01 13:02 Georg-Johann Lay
  0 siblings, 0 replies; only message in thread
From: Georg-Johann Lay @ 2023-08-01 13:02 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:07573fc45a1fefa7e5f03e1930b188f36eba3a11

commit r13-7678-g07573fc45a1fefa7e5f03e1930b188f36eba3a11
Author: Georg-Johann Lay <avr@gjlay.de>
Date:   Tue Aug 1 13:49:17 2023 +0200

    target/110220: Set JUMP_LABEL and LABEL_NUSES of new branch insn generated by
    
    target specific RTL optimization pass .avr-casesi.
    
    gcc/
            PR target/110220
            * config/avr/avr.cc (avr_optimize_casesi): Set JUMP_LABEL and
            LABEL_NUSES of new conditional branch instruction.

Diff:
---
 gcc/config/avr/avr.cc | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/gcc/config/avr/avr.cc b/gcc/config/avr/avr.cc
index 99dca3e5e29..22ae328bd20 100644
--- a/gcc/config/avr/avr.cc
+++ b/gcc/config/avr/avr.cc
@@ -644,9 +644,11 @@ avr_optimize_casesi (rtx_insn *insns[5], rtx *xop)
   emit_insn (gen_add (reg, reg, gen_int_mode (-low_idx, mode)));
   rtx op0 = reg; rtx op1 = gen_int_mode (num_idx, mode);
   rtx labelref = copy_rtx (xop[4]);
-  emit_jump_insn (gen_cbranch (gen_rtx_fmt_ee (GTU, VOIDmode, op0, op1),
-                               op0, op1,
-                               labelref));
+  rtx xbranch = gen_cbranch (gen_rtx_fmt_ee (GTU, VOIDmode, op0, op1),
+			     op0, op1, labelref);
+  rtx_insn *cbranch = emit_jump_insn (xbranch);
+  JUMP_LABEL (cbranch) = xop[4];
+  ++LABEL_NUSES (xop[4]);
 
   seq1 = get_insns();
   last1 = get_last_insn();

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-08-01 13:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-01 13:02 [gcc r13-7678] target/110220: Set JUMP_LABEL and LABEL_NUSES of new branch insn generated by Georg-Johann Lay

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).