aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorYunQiang Su <syq@gcc.gnu.org>2024-05-28 23:44:49 +0800
committerYunQiang Su <syq@debian.org>2024-05-30 01:06:03 +0800
commit9a92e5e56a7f2b19928b8cb7634f59d9c7b2b582 (patch)
treedbfaf32e31b998861d3ae859c9d1c23e3bdd7f2a /gcc
parentd1a1f7e9f0bedea55c558ab95127679bc3e9ff72 (diff)
downloadgcc-9a92e5e56a7f2b19928b8cb7634f59d9c7b2b582.zip
gcc-9a92e5e56a7f2b19928b8cb7634f59d9c7b2b582.tar.gz
gcc-9a92e5e56a7f2b19928b8cb7634f59d9c7b2b582.tar.bz2
MIPS/testsuite: Fix bseli.b fail in msa-builtins.c
commit 05daf617ea22e1d818295ed2d037456937e23530 Author: Jeff Law <jlaw@ventanamicro.com> Date: Sat May 25 12:39:05 2024 -0600 [committed] [v2] More logical op simplifications in simplify-rtx.cc does some simplifications, and then `bseli.b $w1,$w0,255` is found that it is same with `or.v $w1,$w0,$w1`. So there will be no bseli.b instruction generated. Let's use 254 instead of 255 to test the generation of `bseli.b`. gcc/testsuite * gcc.target/mips/msa-builtins.c: Use 254 instead of 255 for bseli.b, as `bseli.b $w0,$w1,255` is same as `or.v $w0,$w0,$w1`.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/gcc.target/mips/msa-builtins.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/testsuite/gcc.target/mips/msa-builtins.c b/gcc/testsuite/gcc.target/mips/msa-builtins.c
index a679f06..6a146b3 100644
--- a/gcc/testsuite/gcc.target/mips/msa-builtins.c
+++ b/gcc/testsuite/gcc.target/mips/msa-builtins.c
@@ -705,7 +705,7 @@
#define BNEG(T) NOMIPS16 T FN (bneg, T ## _DF) (T i, T j) { return BUILTIN (bneg, T ## _DF) (i, j); }
#define BNEGI(T) NOMIPS16 T FN (bnegi, T ## _DF) (T i) { return BUILTIN (bnegi, T ## _DF) (i, 0); }
#define BSEL(T) NOMIPS16 T FN (bsel, v) (T i, T j, T k) { return BUILTIN (bsel, v) (i, j, k); }
-#define BSELI(T) NOMIPS16 T FN (bseli, T ## _DF) (T i, T j) { return BUILTIN (bseli, T ## _DF) (i, j, U8MAX); }
+#define BSELI(T) NOMIPS16 T FN (bseli, T ## _DF) (T i, T j) { return BUILTIN (bseli, T ## _DF) (i, j, U8MAX-1); }
#define BSET(T) NOMIPS16 T FN (bset, T ## _DF) (T i, T j) { return BUILTIN (bset, T ## _DF) (i, j); }
#define BSETI(T) NOMIPS16 T FN (bseti, T ## _DF) (T i) { return BUILTIN (bseti, T ## _DF) (i, 0); }
#define NLOC(T) NOMIPS16 T FN (nloc, T ## _DF) (T i) { return BUILTIN (nloc, T ## _DF) (i); }