On Thu, Jul 11, 2024 at 1:03 AM Jeff Law <jeffreya...@gmail.com> wrote:
>
>
>
> On 6/3/24 5:34 AM, Manolis Tsamis wrote:
> > This is an extension of what was done in PR106590.
> >
> > Currently if a sequence generated in noce_convert_multiple_sets clobbers the
> > condition rtx (cc_cmp or rev_cc_cmp) then only seq1 is used afterwards
> > (sequences that emit the comparison itself). Since this applies only from 
> > the
> > next iteration it assumes that the sequences generated (in particular seq2)
> > doesn't clobber the condition rtx itself before using it in the 
> > if_then_else,
> > which is only true in specific cases (currently only register/subregister 
> > moves
> > are allowed).
> >
> > This patch changes this so it also tests if seq2 clobbers cc_cmp/rev_cc_cmp 
> > in
> > the current iteration. This makes it possible to include arithmetic 
> > operations
> > in noce_convert_multiple_sets.
> >
> > It also makes the code that checks whether the condition is used outside of 
> > the
> > if_then_else emitted more robust.
> >
> > gcc/ChangeLog:
> >
> >       * ifcvt.cc (check_for_cc_cmp_clobbers): Use modified_in_p instead.
> >       (noce_convert_multiple_sets_1): Don't use seq2 if it clobbers cc_cmp.
> >       Refactor the code that sets read_comparison.
> >
> > Signed-off-by: Manolis Tsamis <manolis.tsa...@vrull.eu>
> I'm assuming you've bootstrapped and regression tested on x86, aarch64
> or some other primary platform.  If that assumption is true, then this
> is fine for the trunk.
>
Hi Jeff,

Since some time had passed from when I had submitted this I rerun the
tests and bootstrapped again on x86-64 and AArch64.
The x64 bootstrap failed and after debugging the issue I fixed a
remaining flags-related bug due to allowing all the new arithmetic
operations in multi statement ifcvt.

I have submitted the fixed version as v5 of this patch. I have
bootstrapped and regtested the new patch on the two platforms and
tested various benchmarks and everything looks clean now.

Thanks,
Manolis

> Jeff
>

Reply via email to