On 5/26/2026 8:22 AM, Robin Dapp wrote:
From: Robin Dapp <[email protected]>

This is an example of how a dependent filter would look like.
In RVV sources of widening instructions cannot overlap the
destination except in the highest-numbered part (for EMUL>1).

The dependent filter attached to the constraint "Wtt" is
implemented in riscv_widen_operand_ok.

gcc/ChangeLog:

        * config/riscv/constraints.md (TARGET_VECTOR ? V_REGS : NO_REGS):
        Add widen overlap dependent constraint.
        * config/riscv/riscv-protos.h (riscv_widen_overlap_ok): Declare.
        * config/riscv/riscv.cc (riscv_widen_operand_ok): New function.
        * config/riscv/vector.md: Use new constraint.

gcc/testsuite/ChangeLog:

        * gcc.target/riscv/rvv/base/pr112431-4.c: Un-xfail.
        * gcc.target/riscv/rvv/base/pr112431-5.c: Ditto.
        * gcc.target/riscv/rvv/base/pr112431-6.c: Ditto.
So I wanted to look at this to see how the new infrastructure would be used in practice.  This looks pretty sensible from a usage standpoint.

Jeff

Reply via email to