Hi all,

The constraint Dm is intended to match vectors of minus 1, but actually
checks for CONST1_RTX. This doesn't have a bad effect in practice as its
only use in the aarch64_wrffr pattern for the setffr instruction which
is a VNx16BI operation and -1 and 1 are the same there. That pattern
can only be currently generated through intrinsics anyway that create it
with a CONSTM1_RTX constant.

Fix the constraint definition so that it doesn't become a footgun if its
used in some other pattern.

Bootstrapped and tested on aarch64-none-linux-gnu.
I’m pushing it to trunk.
Thanks,
Kyrill

Signed-off-by: Kyrylo Tkachov <ktkac...@nvidia.com>

gcc/ChangeLog:

        * config/aarch64/constraints.md (Dm): Match CONSTM1_RTX rather
        CONST1_RTX.

Attachment: 0001-aarch64-Check-CONSTM1_RTX-in-definition-of-Dm-constr.patch
Description: 0001-aarch64-Check-CONSTM1_RTX-in-definition-of-Dm-constr.patch

Reply via email to