diff options
author | Andrew Waterman <andrew@sifive.com> | 2024-05-26 18:11:27 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-26 18:11:27 -0700 |
commit | 5c3cc772b6d9c71eee66b19f796f3fe1ec46c4d0 (patch) | |
tree | 74167d91d9cb5ad9e81c6e0101b9d1a6985bc3c5 /riscv | |
parent | 4611b1f7f9243339d9b6a29eeed917416ada167f (diff) | |
parent | 8ad1b68911c2b0c74bc8f00cf7f0f37bceca186e (diff) | |
download | spike-5c3cc772b6d9c71eee66b19f796f3fe1ec46c4d0.zip spike-5c3cc772b6d9c71eee66b19f796f3fe1ec46c4d0.tar.gz spike-5c3cc772b6d9c71eee66b19f796f3fe1ec46c4d0.tar.bz2 |
Merge pull request #1677 from YenHaoChen/pr-vector-reduction
vector: Not logging write of reduction instructions when vl = 0
Diffstat (limited to 'riscv')
-rw-r--r-- | riscv/v_ext_macros.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/riscv/v_ext_macros.h b/riscv/v_ext_macros.h index 8f9820d..a95af3e 100644 --- a/riscv/v_ext_macros.h +++ b/riscv/v_ext_macros.h @@ -608,7 +608,7 @@ static inline bool is_overlapped_widen(const int astart, int asize, reg_t rd_num = insn.rd(); \ reg_t rs1_num = insn.rs1(); \ reg_t rs2_num = insn.rs2(); \ - auto &vd_0_des = P.VU.elt<type_sew_t<x>::type>(rd_num, 0, true); \ + auto &vd_0_des = P.VU.elt<type_sew_t<x>::type>(rd_num, 0, vl > 0); \ auto vd_0_res = P.VU.elt<type_sew_t<x>::type>(rs1_num, 0); \ for (reg_t i = P.VU.vstart->read(); i < vl; ++i) { \ VI_LOOP_ELEMENT_SKIP(); \ @@ -639,7 +639,7 @@ static inline bool is_overlapped_widen(const int astart, int asize, reg_t rd_num = insn.rd(); \ reg_t rs1_num = insn.rs1(); \ reg_t rs2_num = insn.rs2(); \ - auto &vd_0_des = P.VU.elt<type_usew_t<x>::type>(rd_num, 0, true); \ + auto &vd_0_des = P.VU.elt<type_usew_t<x>::type>(rd_num, 0, vl > 0); \ auto vd_0_res = P.VU.elt<type_usew_t<x>::type>(rs1_num, 0); \ for (reg_t i = P.VU.vstart->read(); i < vl; ++i) { \ VI_LOOP_ELEMENT_SKIP(); \ @@ -1019,7 +1019,7 @@ static inline bool is_overlapped_widen(const int astart, int asize, reg_t rd_num = insn.rd(); \ reg_t rs1_num = insn.rs1(); \ reg_t rs2_num = insn.rs2(); \ - auto &vd_0_des = P.VU.elt<type_sew_t<sew2>::type>(rd_num, 0, true); \ + auto &vd_0_des = P.VU.elt<type_sew_t<sew2>::type>(rd_num, 0, vl > 0); \ auto vd_0_res = P.VU.elt<type_sew_t<sew2>::type>(rs1_num, 0); \ for (reg_t i = P.VU.vstart->read(); i < vl; ++i) { \ VI_LOOP_ELEMENT_SKIP(); \ @@ -1047,7 +1047,7 @@ static inline bool is_overlapped_widen(const int astart, int asize, reg_t rd_num = insn.rd(); \ reg_t rs1_num = insn.rs1(); \ reg_t rs2_num = insn.rs2(); \ - auto &vd_0_des = P.VU.elt<type_usew_t<sew2>::type>(rd_num, 0, true); \ + auto &vd_0_des = P.VU.elt<type_usew_t<sew2>::type>(rd_num, 0, vl > 0); \ auto vd_0_res = P.VU.elt<type_usew_t<sew2>::type>(rs1_num, 0); \ for (reg_t i = P.VU.vstart->read(); i < vl; ++i) { \ VI_LOOP_ELEMENT_SKIP(); \ |