Skip to content

Commit

Permalink
target/110220: Set JUMP_LABEL and LABEL_NUSES of new branch insn gene…
Browse files Browse the repository at this point in the history
…rated 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.
  • Loading branch information
sprintersb committed Aug 1, 2023
1 parent 1762957 commit 1d379bb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions gcc/config/avr/avr.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 1d379bb

Please sign in to comment.