https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107273
H.J. Lu <hjl.tools at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|DUPLICATE |--- Last reconfirmed| |2022-10-17 Status|RESOLVED |REOPENED Ever confirmed|0 |1 --- Comment #6 from H.J. Lu <hjl.tools at gmail dot com> --- (In reply to Hongtao.liu from comment #4) > Looks like the same issue as PR107172 since below change can also pass all > the testcase in the PR. > > diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md > index 8e847520491..be815341af5 100644 > --- a/gcc/config/i386/i386.md > +++ b/gcc/config/i386/i386.md > @@ -21335,7 +21335,7 @@ (define_insn "*x86_mov<mode>cc_0_m1_neg" > (define_expand "x86_mov<mode>cc_0_m1_neg" > [(parallel > [(set (match_operand:SWI48 0 "register_operand") > - (neg:SWI48 (ltu:SWI48 (reg:CCC FLAGS_REG) (const_int 0)))) > + (neg:SWI48 (ltu:SWI48 (reg:CC FLAGS_REG) (const_int 0)))) > (clobber (reg:CC FLAGS_REG))])]) > > (define_split This doesn't fix the -O3 issue in the first testcase nor the second testcase.