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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
           Severity|normal                      |enhancement
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2024-11-30

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.

I think it should be easy to support it with a slight change to this pattern:
```
(define_insn "addcarry<mode>"
  [(set (reg:CCC FLAGS_REG)
        (compare:CCC
          (zero_extend:<DWI>
            (plus:SWI48
              (plus:SWI48
                (match_operator:SWI48 5 "ix86_carry_flag_operator"
                  [(match_operand 3 "flags_reg_operand") (const_int 0)])
                (match_operand:SWI48 1 "nonimmediate_operand" "%0,0,rm,r"))
              (match_operand:SWI48 2 "nonimmediate_operand" "r,rm,r,m")))
          (plus:<DWI>
            (zero_extend:<DWI> (match_dup 2))
            (match_operator:<DWI> 4 "ix86_carry_flag_operator"
              [(match_dup 3) (const_int 0)]))))
   (set (match_operand:SWI48 0 "nonimmediate_operand" "=rm,r,r,r")
        (plus:SWI48 (plus:SWI48 (match_op_dup 5
                                 [(match_dup 3) (const_int 0)])
                                (match_dup 1))
                    (match_dup 2)))]
  "ix86_binary_operator_ok (PLUS, <MODE>mode, operands, TARGET_APX_NDD)"
  "@
  adc{<imodesuffix>}\t{%2, %0|%0, %2}
  adc{<imodesuffix>}\t{%2, %0|%0, %2}
  adc{<imodesuffix>}\t{%2, %1, %0|%0, %1, %2}
  adc{<imodesuffix>}\t{%2, %1, %0|%0, %1, %2}"
  [(set_attr "isa" "*,*,apx_ndd,apx_ndd")
   (set_attr "type" "alu")
   (set_attr "use_carry" "1")
   (set_attr "pent_pair" "pu")
   (set_attr "mode" "<MODE>")])
```


operand 2 would need to change.

Reply via email to