Hi Juzhe,

I think an extra param might be too intrusive.  I would expect normal
hardware implementations to support unaligned accesses (but they might
be slow which should be covered by costs) and only rarely have hardware
that doesn't support it and raises exceptions.

Therefore I would suggest to have a separate TARGET attribute like
TARGET_RVV_MISALIGNMENT_SUPPORTED (or so) that enable or disables the
movmisalign pattern.  This would be enabled by default for now and when
there is a uarch that wants different behavior it should do something
like

 #define TARGET_RVV_MISALIGNMENT_SUPPORTED (uarch != SPECIFIC_UARCH)

Regards
 Robin

Reply via email to