On Thu, 19 May 2022, Jakub Jelinek wrote:

> On Thu, May 19, 2022 at 02:13:33PM +0000, Richard Biener wrote:
> > > Though, depending on what exactly you allow or disallow, maybe even
> > > the im != 0 might not be acceptable.
> > > Oh, and if COND_EXPRs can only use some limited set of comparisons, we 
> > > might
> > > need to adjust e.g. arith_overflow_check_p and various other spots in
> > > tree-ssa-math-opts.cc and other passes.
> > 
> > With the changes I have in the queue the !cond_stmt path should be
> > effectively dead code (though I don't remove such immediately).
> > 
> > Not sure what you think the issue with arith_overflow_check_p would be?
> > Note this is only about COND_EXPRs in gimple assignments.
> 
> Just that there will be more dead code in the compiler.
> At least tree-ssa-math-opts.cc in various spots (but I think phiopt too and
> other spots I've touched too) are looking for all 3 kinds of comparisons,
> GIMPLE_CONDs, comparisons in COND_EXPR first operand and assignments
> with tcc_comparison rhs codes and deal with all 3.  If we restrict what
> can appear in COND_EXPR first operand in gimple assignments, perhaps we'll
> need to only deal with the first and last case and not the COND_EXPR ones.

Ah, yeah - there will be followup cleanup opportunities like shaving
off 5% of gimple-match.cc when I'm happy with a required phiopt
adjustment.

Richard.

Reply via email to