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

--- Comment #31 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Segher Boessenkool from comment #29)
> (In reply to Hongtao.liu from comment #23)
> > looking at i386.c put_condition_code used by *setcc_qi, it looks like (EQ
> > (reg:CCCmode FLAG_REG) (const_int 0)) means get carry flag.
> > Not (LTU: (REG:CCCmode FLAGS_REG) (const_int 0)).
> > Now I got more confused.
> 
> (eq (reg:CCC 17) (const_int 0))  means that the comparison that did set reg
> 17
> returned "equal".
> 

Isn't the meaning of MODE_CC comparison only known to the backend? On x86, EQ
in

  (set (pc) (if_then_else
               (eq (reg:CCO FLAGS_REG) (const_int 0))
               (label_ref (match_operand 3))
               (pc)))]

doesn't evaluate to true when (reg:CCO FLAGS_REG) is 0.  It is true when
(reg:CCO FLAGS_REG) is set.

Reply via email to