On Mon, 2020-01-06 at 09:24 +0100, Jakub Jelinek wrote:
> Hi!
> 
> As mentioned in the PR, the following testcase ICEs because rs, while valid
> add_operand is not valid add_cint_operand and so gen_add3_insn fails,
> because it doesn't meet the expander predicates.
> 
> Fixed thusly, bootstrapped/regtested on powerpc64{,le}-linux, ok for trunk?
> 
> Another option would be to:
> 1) always use gen_add3_insn, but if it returns NULL use the extra
> emit_move_insn (end_addr, GEN_INT (-rounded_size));
> and retry with end_addr instead of rs
> 2) if the first gen_add3_insn returned NULL or if it created more than one
> instruction, add the REG_FRAME_RELATED_EXPR note on the last insn
> 
> Is that what you want to do instead?
> 
> 2020-01-06  Jakub Jelinek  <ja...@redhat.com>
> 
>       PR target/93122
>       * config/rs6000/rs6000-logue.c
>       (rs6000_emit_probe_stack_range_stack_clash): Only use gen_addr3_insn
>       if add_cint_operand predicate matches.  Use rs instead of doing
>       GEN_INT again.
> 
>       * gcc.target/powerpc/pr93122.c: New test.
I think this is fine, but give the PPC maintainers a few days to chime
in.

jeff
> 

Reply via email to