> (set (reg:SI 93)
>      (neg:SI (ltu:SI (reg:CCC 17 flags) (const_int 0 [0]))))
> 
> as
> 
> (set (reg:SI 93)
>      (neg:SI (ltu:SI (const_int 1) (const_int 0 [0]))))
> 
> which leads to incorrect results since LTU on MODE_CC register isn't the
> same as "unsigned less than" in x86 backend.

That's not specific to the x86 back-end, i.e. it's a generic caveat.

>       PR target/107172
>       * config/i386/i386.md (UNSPEC_CC_NE): New.
>       Replace ne:CCC/ne:CCO with UNSPEC_CC_NE in neg patterns.

FWIW the SPARC back-end uses a COMPARE instead of an UNSPEC here.

-- 
Eric Botcazou


Reply via email to