-
- Downloads
[PATCH] RISC-V: Support simplify (-1-x) for vector.
From: Yanzhang Wang <yanzhang.wang@intel.com> The pattern is enabled for scalar but not for vector. The patch try to make it consistent and will convert below code, shortcut_for_riscv_vrsub_case_1_32: vl1re32.v v1,0(a1) vsetvli zero,a2,e32,m1,ta,ma vrsub.vi v1,v1,-1 vs1r.v v1,0(a0) ret to, shortcut_for_riscv_vrsub_case_1_32: vl1re32.v v1,0(a1) vsetvli zero,a2,e32,m1,ta,ma vnot.v v1,v1 vs1r.v v1,0(a0) ret gcc/ChangeLog: * simplify-rtx.cc (simplify_context::simplify_binary_operation_1): Use CONSTM1_RTX. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/base/simplify-vrsub.c: New test.
Loading
Please register or sign in to comment