https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123839

            Bug ID: 123839
           Summary: riscv: Optimize constant permute to slidedown +
                    slideup.
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: enhancement
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rdapp at gcc dot gnu.org
                CC: law at gcc dot gnu.org, rzinsly at ventanamicro dot com
  Target Milestone: ---
            Target: riscv

Cases like the following should be implemented with vslidedown and vslideup.
Right now we use vslideup + vcompress which requires a mask (and the
accompanying mask load).

typedef int vnx4i __attribute__ ((vector_size (16)));

vnx4i
test (vnx4i x, vnx4i y)
{
  return __builtin_shufflevector (x, y, 2, 3, 4, 5);
}

Reply via email to