On Tue, 2020-03-24 at 10:50 +0100, Jakub Jelinek wrote:
> On Mon, Mar 23, 2020 at 06:00:06PM -0600, Jeff Law via Gcc-patches wrote:
> > +/* Return true if CODE is valid for comparisons of mode MODE, false
> > + otherwise.
> > +
> > + It is always safe to return false, even if the code was valid
On Mon, Mar 23, 2020 at 06:00:06PM -0600, Jeff Law via Gcc-patches wrote:
> +/* Return true if CODE is valid for comparisons of mode MODE, false
> + otherwise.
> +
> + It is always safe to return false, even if the code was valid for the
> + given mode as that will merely suppress optimizatio
As outlined in the BZ simplify_logical_relational_operation does not validate
that the comparison code it selects is ultimately valid for the mode of the
comparison.
So we could have something like:
(ior (lt (...)) (gt (...))
Which it happily turns into
(ltgt (...))
Which is not valid for int