Alex Coplan <alex.cop...@arm.com> writes:
> Hi Remi,
>
> On 12/06/2025 17:02, Richard Sandiford wrote:
>> Remi Machet <rmac...@nvidia.com> writes:
>> > +  "TARGET_SIMD"
>> > +  "#"
>> > +  "&& true"
>> > +  [(const_int 0)]
>> > +{
>> > +  rtx tmp;
>> > +  if (can_create_pseudo_p ())
>> > +    tmp = gen_reg_rtx (<MODE>mode);
>> > +  else
>> > +    tmp = gen_rtx_REG (<MODE>mode, REGNO (operands[0]));
>> > +  emit_insn (gen_move_insn (tmp,
>> > +              aarch64_simd_gen_const_vector_dup (<MODE>mode, -1)));
>> 
>> This can be simplified to:
>> 
>>   emit_insn (gen_move_insn (tmp, CONSTM1_RTX (<MODE>mode)));
>
> Is there a reason to prefer emit_insn (gen_move_insn (x,y)) over just
> emit_move_insn (x,y)?  I tried the latter locally and it seemed to work.

Gah, thanks for catching that.  I was concentrating so much on the
constant that I didn't notice the emit_insn (gen_move_insn (...)) thing.

Richard

Reply via email to