On Wed, May 27, 2026 at 11:40 AM Uros Bizjak <[email protected]> wrote:
>
> On Wed, May 27, 2026 at 11:03 AM Hongyu Wang <[email protected]> wrote:
> >
> > Hi,
> >
> > For processors like Novalake with APX, benchmark shows memory form of
> > NDD instructions is not beneficial. A new tuning enable_ndd_mem is
> > added and disabled by default. The new isa attributes apx_ndd_mem
> > and apx_ndd_64_mem are adopted for memory-operand alternatives for NDD
> > related patterns, and enabled attr is dispatched to control the
> > generation of NDD memory form.
>
> Perhaps you should use preferred_for_speed/preferred_for_size
> attributes instead of hard-disabling relevant alternatives? It looks
> that move+insn is still larger than insn with memory op, so the latter
> would be preferred for cold sections. Please see many examples in
> i386.md.

Just add:

   (set (attr "preferred_for_speed")
     (cond [(eq_attr "alternative" "3,4,5")
          (symbol_ref "TARGET_ENABLE_NDD_MEM")]
       (symbol_ref "true")))

if you want alternatives 3,4 and 5 soft-enabled for
TARGET_ENABLE_NDD_MEM and disabled otherwise.

Uros.

Reply via email to