On Tue, Mar 17, 2020 at 10:40:00AM +0100, Uros Bizjak via Gcc-patches wrote:
> (define_split
>   [(set (match_operand:DI 0 "memory_operand")
>          (zero_extend:DI (match_operand:SI 1 "memory_operand")))]
>   "reload_completed"
>   [(set (match_dup 4) (const_int 0))]
>   "split_double_mode (DImode, &operands[0], 1, &operands[3], &operands[4]);")
> 
> And would result in a single SImode move of 0 to the high part of the
> memory location.

Shouldn't that be something done in the generic code so that it benefits all
targets?  If we have a zero extension from memory to matching memory
(according to endianity), then storing 0 to the other part is probably a win
(almost) everywhere.
So, if e.g. simplify-rtx.c does that and combine then checks if the target
has corresponding store instruction...

        Jakub

Reply via email to