Skip to content

Commit 755ad71

Browse files
committed
zvfofp4min: fix shared contraint with v[zs]ext
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
1 parent 65e41ba commit 755ad71

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

riscv/v_ext_macros.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1405,8 +1405,6 @@ VI_VX_ULOOP({ \
14051405
#define VI_EXT_CHECK(div) \
14061406
require(insn.rd() != insn.rs2()); \
14071407
require_vm; \
1408-
reg_t from = P.VU.vsew / div; \
1409-
require(from >= e8 && from <= e64); \
14101408
require(((float)P.VU.vflmul / div) >= 0.125 && ((float)P.VU.vflmul / div) <= 8 ); \
14111409
require_align(insn.rd(), P.VU.vflmul); \
14121410
require_align(insn.rs2(), P.VU.vflmul / div); \
@@ -1418,6 +1416,8 @@ VI_VX_ULOOP({ \
14181416

14191417
// vector: sign/unsiged extension
14201418
#define VI_VV_EXT(div, type) \
1419+
reg_t from = P.VU.vsew / div; \
1420+
require(from >= e8 && from <= e64); \
14211421
VI_EXT_CHECK(div); \
14221422
VI_LOOP_BASE \
14231423
reg_t pat = (((P.VU.vsew >> 3) << 4) | from >> 3); \

0 commit comments

Comments
 (0)