From 7909736831ddcc4a6a3fef3a09700259ae27c9bf Mon Sep 17 00:00:00 2001 From: Jiajie Chen Date: Tue, 12 Dec 2023 00:16:00 +0800 Subject: [PATCH] Fix vshuf check --- docs/lsx_misc/vshuf.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/lsx_misc/vshuf.md b/docs/lsx_misc/vshuf.md index 02fa8ef5..d3e02232 100644 --- a/docs/lsx_misc/vshuf.md +++ b/docs/lsx_misc/vshuf.md @@ -48,7 +48,7 @@ Shuffle half words from `b` and `c` with indices from `a`. ```c++ for (int i = 0;i < 8;i++) { - if ((c.half[i] % 16) < 8) { + if ((a.half[i] % 16) < 8) { dst.half[i] = c.half[a.half[i] % 8]; } else { dst.half[i] = b.half[a.half[i] % 8]; @@ -75,7 +75,7 @@ Shuffle words from `b` and `c` with indices from `a`. ```c++ for (int i = 0;i < 4;i++) { - if ((c.word[i] % 8) < 4) { + if ((a.word[i] % 8) < 4) { dst.word[i] = c.word[a.word[i] % 4]; } else { dst.word[i] = b.word[a.word[i] % 4]; @@ -102,7 +102,7 @@ Shuffle words from `b` and `c` with indices from `a`. ```c++ for (int i = 0;i < 2;i++) { - if ((c.word[i] % 4) < 2) { + if ((a.word[i] % 4) < 2) { dst.word[i] = c.word[a.word[i] % 2]; } else { dst.word[i] = b.word[a.word[i] % 2];