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

--- Comment #10 from Segher Boessenkool <segher at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #8)
> In particular, it is combine_simplify_rtx that is called on:
> (zero_extend:SI (subreg:QI (ior:TI (and:TI (reg/v:TI 103 [ f ])
>                 (const_int -16711681 [0xffffffffff00ffff]))
>             (ashift:TI (and:TI (clobber:TI (const_int 0 [0]))
>                     (const_int 255 [0xff]))
>                 (const_int 16 [0x10]))) 0))
> which simplifies it into
> (and:SI (subreg:SI (reg/v:TI 103 [ f ]) 0)
>     (const_int 255 [0xff]))

That is very wrong.  A clobber of 0 should *never* be removed.  Various
parts of generic code know about that already, btw.

A clobber of 0 means "Abort! Abort!"  It does not mean "well, here is
something you can optimise away more easily".

Do you want to investigate further, or shall I?

Reply via email to