Ping :)
> Factor common RTL parsing out of the existing macro-fusion > recognizers. Preserve aggressive destination overmatching before > register allocation while checking real producer-consumer dependencies > in both scheduling passes. > > Use parameterized arithmetic and memory classifiers so later fusion > recognizers can share structural matching without duplicating > microarchitecture-specific constraints. > > gcc/ChangeLog: > > * config/riscv/riscv-fusion.cc: Include insn-attr.h. > (riscv_fuse_sets_p): New function. > (riscv_set_extract_word_binary_p): Likewise. > (riscv_regno): Likewise. > (riscv_fuse_same_reg_p): Likewise. > (riscv_fuse_same_dest_p): Rename from > riscv_fusion_same_dest_p and handle hard-register SUBREGs. Preserve > preallocation destination overmatching and optionally check the > first-source dependency. > (riscv_set_is_addiw_p): New function. > (riscv_insn_is_mv_li_p): Likewise. > (riscv_insn_is_addi_type_p): Likewise. > (riscv_set_is_shift_p): Likewise. > (riscv_set_is_slli_p): Likewise. > (riscv_set_is_srli_p): Likewise. > (riscv_set_is_srai_p): Likewise. > (enum sched_fusion_type): New enum. > (riscv_fusion_mem_info): New struct. > (riscv_fuse_extract_address): New function. > (riscv_fuse_mem_p): Likewise. > (riscv_fuse_zext_common): Require RV64 and use the common > helpers. > (riscv_fuse_zextw): Update accordingly. > (riscv_fuse_zextws): Likewise. > (riscv_fuse_zexth): Likewise. > (riscv_fuse_ldindexed): Use the common helpers. > (riscv_fuse_expanded_ld): Likewise. > (riscv_fuse_ldpreincrement): Likewise. Check the update dependency. > (riscv_fuse_lui_addi): Reuse the ADDI matcher, check the source > dependency, and reject zero-valued LUI patterns. > (riscv_fuse_auipc_addi): Reuse the ADDI matcher and check the source > dependency. > (riscv_fuse_lui_ld): Use the common helpers. > (riscv_fuse_auipc_ld): Likewise. Check the address dependency. > (riscv_fuse_aligned_std): Use the common helpers. > (riscv_fuse_bfext): Likewise. > (riscv_fuse_b_alui): Likewise. > > gcc/testsuite/ChangeLog: > > * gcc.target/riscv/fusion-lui-addi-prera-rtl.c: New test. >
