Skip to content

Commit 0c4d7e8

Browse files
committed
[TEST ONLY] Break RV64 backend
Just to check that the tests will fail... Signed-off-by: Hanno Becker <beckphan@amazon.co.uk>
1 parent 6636716 commit 0c4d7e8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

mlkem/native/riscv64/src/rv64v_poly.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,11 @@ static inline vint16m1_t fq_mul_vv(vint16m1_t rx, vint16m1_t ry, size_t vl)
9090
vint16m1_t rl, rh;
9191

9292
rh = __riscv_vmulh_vv_i16m1(rx, ry, vl); /* h = (x * y) / R */
93-
rl = __riscv_vmul_vv_i16m1(rx, ry, vl); /* l = (x * y) % R */
93+
/* !!! DELIBERATELY BREAKING !!! */
94+
/* ONLY FOR TEST */
95+
rl = __riscv_vmul_vv_i16m1(rx, rx, vl); /* l = (x * y) % R */
96+
/* CORRECT LINE */
97+
/* rl = __riscv_vmul_vv_i16m1(rx, ry, vl); */ /* l = (x * y) % R */
9498
return fq_redc(rh, rl, vl);
9599
#else /* !MLK_RVV_WIDENING_MUL */
96100
return fq_redc2(__riscv_vwmul_vv_i32m2(rx, ry, vl), vl);

0 commit comments

Comments
 (0)