[PATCH] middle-end: fix de-optimizations with bitclear patterns on signed values
Jakub Jelinek
jakub@redhat.com
Tue Oct 26 13:20:08 GMT 2021
On Tue, Oct 26, 2021 at 03:13:29PM +0200, Richard Biener wrote:
> try
> auto c = ...;
> signed char c2 = c;
> return c2 >= ...
> then
That won't work, at least when using <compare>, which is what we with the
optimization want to deal with primarily.
Because std::partial_ordering etc. aren't implicitly nor explicitly
convertible to int or signed char etc.
Sure, one could in the testcase define its own std::strong_ordering etc.
and define a conversion operator for it...
Jakub
More information about the Gcc-patches
mailing list