https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92342

--- Comment #8 from Segher Boessenkool <segher at gcc dot gnu.org> ---
(In reply to Richard Earnshaw from comment #6)
> (In reply to Richard Earnshaw from comment #5)
> > So if the AND-based idiom is now preferred, shouldn't the if-then-else
> > variant be transformed into it?  Similarly for IOR, when we get
> > 
> > (IOR (NEG (<cond-op>)) (reg))
> > 
> > from
> > 
> > (IF_THEN_ELSE (<cond-op>)
> >   (reg)
> >   (const_int -1))
> 
> except that should be 
> 
> (IF_THEN_ELSE (<cond-op>')
>   (reg)
>   (const_int -1))
> 
> Where <cond-op>' is the reversed condition.

Or just

(if_then_else (<cond-op>)
              (const_int -1)
              (reg))

(No order )like constant last) of those two arguments is prescribed, and
this makes sense).

Reply via email to