aboutsummaryrefslogtreecommitdiff
path: root/libjava/java
diff options
context:
space:
mode:
authorPan Li <pan2.li@intel.com>2025-10-26 15:21:15 +0800
committerPan Li <pan2.li@intel.com>2025-11-07 17:48:18 +0800
commit94e605a8080e01c0eb575c22310ab7caadc58f86 (patch)
tree1d668e1b38a97df9bdb60dc3a6bc58667a11b5fc /libjava/java
parentf6bca888663cc8d451b0f01ea459454b2ebc4c81 (diff)
downloadgcc-94e605a8080e01c0eb575c22310ab7caadc58f86.zip
gcc-94e605a8080e01c0eb575c22310ab7caadc58f86.tar.gz
gcc-94e605a8080e01c0eb575c22310ab7caadc58f86.tar.bz2
RISC-V: RISC-V: Combine vec_duplicate + vwmaccu.vv to vwmaccu.vx on GR2VR cost
This patch would like to combine the vec_duplicate + vwmaccu.wv to the vwmaccu.vx. From example as below code. The related pattern will depend on the cost of vec_duplicate from GR2VR. Then the late-combine will take action if the cost of GR2VR is zero, and reject the combination if the GR2VR cost is greater than zero. Assume we have asm code like below, GR2VR cost is 0. Before this patch: 11 beq a3,zero,.L8 12 vsetvli a5,zero,e32,m1,ta,ma 13 vmv.v.x v2,a2 ... 16 .L3: 17 vsetvli a5,a3,e32,m1,ta,ma ... 22 vwmaccu.wv v1,v2,v3 ... 25 bne a3,zero,.L3 After this patch: 11 beq a3,zero,.L8 ... 14 .L3: 15 vsetvli a5,a3,e32,m1,ta,ma ... 20 vwmaccu.wx v1,a2,v3 ... 23 bne a3,zero,.L3 Unfortunately, and similar as vwaddu.vv, only widening from uint32_t to uint64_t has the necessary zero-extend during combine, we loss the extend op after expand for any other types. gcc/ChangeLog: * config/riscv/autovec-opt.md (*widen_mul_plus_vx_<mode>): Add new pattern to combine the vwmaccu.vx. * config/riscv/vector.md (*pred_widen_mul_plus_u_vx<mode>_undef): Add undef define_insn for vmwaccu.vx emiting. (@pred_widen_mul_plus_u_vx<mode>): Ditto. Signed-off-by: Pan Li <pan2.li@intel.com>
Diffstat (limited to 'libjava/java')
0 files changed, 0 insertions, 0 deletions