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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |law at gcc dot gnu.org
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2024-07-14
            Version|unknown                     |15.0
   Target Milestone|---                         |15.0

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
What is missing between 14 and 15 is:
        xor     edx, edx

is due to ext_dce does:
Processing insn:
   13: r116:SI=zero_extend(r117:QI)
      REG_DEAD r117:QI
Trying to simplify pattern:
(zero_extend:SI (reg:QI 117))
rescanning insn with uid = 13.
Successfully transformed to:
(subreg:SI (reg:QI 117) 0)



Which originally comes from:

(insn 12 11 13 2 (set (reg:QI 117)
        (ne:QI (reg:CCZ 17 flags)
            (const_int 0 [0]))) "/app/example.cpp":8:25 1241 {*setcc_qi}
     (expr_list:REG_DEAD (reg:CCZ 17 flags)
        (nil)))
(insn 13 12 14 2 (set (reg:SI 116 [ _6 ])
        (subreg:SI (reg:QI 117) 0)) "/app/example.cpp":8:25 89
{*movsi_internal}
     (expr_list:REG_DEAD (reg:QI 117)
        (nil)))

But the set QI here does not set the full register; it only touches the lower
part so the zero_extend is still needed.

Reply via email to