aboutsummaryrefslogtreecommitdiff
path: root/riscv/insns/vredmaxu_vs.h
diff options
context:
space:
mode:
authorChih-Min Chao <chihmin.chao@sifive.com>2019-05-15 09:33:10 -0700
committerChih-Min Chao <chihmin.chao@sifive.com>2019-05-19 21:22:43 -0700
commit23e4c96aec9e13e5bbfc111b57cd00ba7ada9a75 (patch)
tree9266435a0b8b6d80932d6edca0e24538b2ee6f66 /riscv/insns/vredmaxu_vs.h
parentd5c53ebfb3fcda4d213fb8f0af791929ad3ef934 (diff)
downloadspike-23e4c96aec9e13e5bbfc111b57cd00ba7ada9a75.zip
spike-23e4c96aec9e13e5bbfc111b57cd00ba7ada9a75.tar.gz
spike-23e4c96aec9e13e5bbfc111b57cd00ba7ada9a75.tar.bz2
rvv: fix reduction loop
1. write result when vl > 0 2. zero inactive part Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
Diffstat (limited to 'riscv/insns/vredmaxu_vs.h')
-rw-r--r--riscv/insns/vredmaxu_vs.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/riscv/insns/vredmaxu_vs.h b/riscv/insns/vredmaxu_vs.h
index ca33a95..960f486 100644
--- a/riscv/insns/vredmaxu_vs.h
+++ b/riscv/insns/vredmaxu_vs.h
@@ -1,5 +1,5 @@
// vredmaxu.vs vd, vs2 ,vs1
VI_VV_ULOOP_REDUCTION
({
- vdu_0_res = (vdu_0_res >= vs2u) ? vdu_0_res : vs2u;
+ vd_0_res = (vd_0_res >= vs2) ? vd_0_res : vs2;
})