On Fri, Jul 26, 2024 at 2:00 PM Jeff Law <jeffreya...@gmail.com> wrote:
> On 7/24/24 12:00 PM, Raphael Moreira Zinsly wrote:
> ...
> > diff --git a/gcc/config/riscv/riscv.md b/gcc/config/riscv/riscv.md
> > index 46c46039c33..5780c5abacf 100644
> > --- a/gcc/config/riscv/riscv.md
> > +++ b/gcc/config/riscv/riscv.md
> > @@ -3969,7 +3969,7 @@
> >       (unspec:BLK [(match_operand:X 0 "register_operand" "r")
> >                    (match_operand:X 1 "register_operand" "r")]
> >                   UNSPEC_TIE))]
> > -  ""
> > +  "!rtx_equal_p (operands[0], operands[1])"
> >     ""
> >     [(set_attr "type" "ghost")
> >      (set_attr "length" "0")]
> I'm guessing this condition to to prevent subsequent passes from combing
> the stack tie with something like a reg->reg copy resulting in a stack
> tie with the same source/dest register?

Correct, specifically it can result in a stack tie with sp as both the
src and dest registers and removing the S0 move needed in the vector
probe loop.

> Or are we trying to make sure the users of this insn never generate that
> scenario to begin with?
>
> jeff
>


-- 
Raphael Moreira Zinsly

Reply via email to