* [MIPS][Testsuite] specify msa-fmadd.c abis
@ 2019-07-03 6:53 Paul Hua
2019-07-03 22:57 ` Jeff Law
0 siblings, 1 reply; 2+ messages in thread
From: Paul Hua @ 2019-07-03 6:53 UTC (permalink / raw)
To: gcc-patches
Cc: Jeff Law <law@redhat.com> (law@redhat.com), Matthew Fortune
[-- Attachment #1: Type: text/plain, Size: 1353 bytes --]
Hi,
The msa-fmadd.c fails on abi=64, the attached patch fixed by specify the abis.
spawn -ignore SIGHUP
/home/xuchenghua/GCC/test/gcc-r272929_obj/gcc/xgcc
-B/home/xuchenghua/GCC/test/gcc-r272929_obj/gcc/
/home/xuchenghua/GCC/gcc_git_trunk/gcc/testsuite/gcc.target/mips/msa-fmadd.c
-fno-diagnostics-show-caret -fno-diagnostics-show-line-numbers
-fdiagnostics-color=never -O1 -DNOMIPS16=__attribute__((nomips16))
-DNOMICROMIPS=__attribute__((nomicromips))
-DNOCOMPRESSION=__attribute__((nocompression)) -EL -mhard-float
-mdouble-float -mfp64 -mno-mips16 -modd-spreg -mmsa
-flax-vector-conversions -ffat-lto-objects -fno-ident -S -o
msa-fmadd.s^M
/home/xuchenghua/GCC/gcc_git_trunk/gcc/testsuite/gcc.target/mips/msa-fmadd.c:11:16:
warning: call-clobbered register used for global register variable^M
/home/xuchenghua/GCC/gcc_git_trunk/gcc/testsuite/gcc.target/mips/msa-fmadd.c:12:16:
warning: call-clobbered register used for global register variable^M
FAIL: gcc.target/mips/msa-fmadd.c -O1 (test for excess errors)
Excess errors:
/home/xuchenghua/GCC/gcc_git_trunk/gcc/testsuite/gcc.target/mips/msa-fmadd.c:11:16:
warning: call-clobbered register used for global register variable
/home/xuchenghua/GCC/gcc_git_trunk/gcc/testsuite/gcc.target/mips/msa-fmadd.c:12:16:
warning: call-clobbered register used for global register variable
Ok for commit ?
[-- Attachment #2: 0001-MIPS-Testsuite-specify-msa-fmadd.c-abis.patch --]
[-- Type: text/x-patch, Size: 4165 bytes --]
From 912581f71ad37b415aec06d23210109e1c778296 Mon Sep 17 00:00:00 2001
From: Chenghua Xu <paul.hua.gm@gmail.com>
Date: Mon, 17 Jun 2019 14:36:37 +0800
Subject: [PATCH] [MIPS][Testsuite] specify msa-fmadd.c abis.
gcc/testsuite/
* gcc.target/mips/mips-fmadd.c: Rename to ...
* gcc.target/mips/mips-fmadd-o32.c: ... Here; add abi=32.
* gcc.target/mips/mips-fmadd-n64.c: New.
---
gcc/testsuite/gcc.target/mips/msa-fmadd-n64.c | 101 +++++++++++++++++++++
.../mips/{msa-fmadd.c => msa-fmadd-o32.c} | 2 +-
2 files changed, 102 insertions(+), 1 deletion(-)
create mode 100644 gcc/testsuite/gcc.target/mips/msa-fmadd-n64.c
rename gcc/testsuite/gcc.target/mips/{msa-fmadd.c => msa-fmadd-o32.c} (96%)
diff --git a/gcc/testsuite/gcc.target/mips/msa-fmadd-n64.c b/gcc/testsuite/gcc.target/mips/msa-fmadd-n64.c
new file mode 100644
index 00000000000..199b366512c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/msa-fmadd-n64.c
@@ -0,0 +1,101 @@
+/* { dg-do compile } */
+/* { dg-options "-mabi=64 -mfp64 -mhard-float -mmsa -EL -flax-vector-conversions" } */
+/* { dg-skip-if "uses global registers" { *-*-* } { "-O0" } { "" } } */
+
+typedef int v4i32 __attribute__ ((vector_size(16)));
+typedef float v4f32 __attribute__ ((vector_size(16)));
+typedef double v2f64 __attribute__ ((vector_size(16)));
+
+/* Test that MSA FMADD-like intrinsics do not use first operand for multiplication. */
+
+register v4i32 a __asm__("$f24");
+register v4i32 b __asm__("$f25");
+register v4f32 c __asm__("$f26");
+register v4f32 d __asm__("$f27");
+register v2f64 e __asm__("$f28");
+register v2f64 f __asm__("$f29");
+
+void
+maddv_b_msa (void)
+{
+ a = __builtin_msa_maddv_b (a, b, b);
+}
+/* { dg-final { scan-assembler "maddv\\\.b\t\\\$w24,\\\$w25,\\\$w25" } } */
+
+void
+maddv_h_msa (void)
+{
+ a = __builtin_msa_maddv_h (a, b, b);
+}
+/* { dg-final { scan-assembler "maddv\\\.h\t\\\$w24,\\\$w25,\\\$w25" } } */
+
+void
+maddv_w_msa (void)
+{
+ a = __builtin_msa_maddv_w (a, b, b);
+}
+/* { dg-final { scan-assembler "maddv\\\.w\t\\\$w24,\\\$w25,\\\$w25" } } */
+
+void
+maddv_d_msa (void)
+{
+ a = __builtin_msa_maddv_d (a, b, b);
+}
+/* { dg-final { scan-assembler "maddv\\\.d\t\\\$w24,\\\$w25,\\\$w25" } } */
+
+void
+msubv_b_msa (void)
+{
+ a = __builtin_msa_msubv_b (a, b, b);
+}
+/* { dg-final { scan-assembler "msubv\\\.b\t\\\$w24,\\\$w25,\\\$w25" } } */
+
+void
+msubv_h_msa (void)
+{
+ a = __builtin_msa_msubv_h (a, b, b);
+}
+/* { dg-final { scan-assembler "msubv\\\.h\t\\\$w24,\\\$w25,\\\$w25" } } */
+
+void
+msubv_w_msa (void)
+{
+ a = __builtin_msa_msubv_w (a, b, b);
+}
+/* { dg-final { scan-assembler "msubv\\\.w\t\\\$w24,\\\$w25,\\\$w25" } } */
+
+void
+msubv_d_msa (void)
+{
+ a = __builtin_msa_msubv_d (a, b, b);
+}
+/* { dg-final { scan-assembler "msubv\\\.d\t\\\$w24,\\\$w25,\\\$w25" } } */
+
+void
+fmadd_w_msa (void)
+{
+ c = __builtin_msa_fmadd_w (c, d, d);
+}
+/* { dg-final { scan-assembler "fmadd\\\.w\t\\\$w26,\\\$w27,\\\$w27" } } */
+
+void
+fmadd_d_msa (void)
+{
+ e = __builtin_msa_fmadd_d (e, f, f);
+}
+/* { dg-final { scan-assembler "fmadd\\\.d\t\\\$w28,\\\$w29,\\\$w29" } } */
+
+void
+fmsub_w_msa (void)
+{
+ c = __builtin_msa_fmsub_w (c, d, d);
+}
+/* { dg-final { scan-assembler "fmsub\\\.w\t\\\$w26,\\\$w27,\\\$w27" } } */
+
+void
+fmsub_d_msa (void)
+{
+ e = __builtin_msa_fmsub_d (e, f, f);
+}
+/* { dg-final { scan-assembler "fmsub\\\.d\t\\\$w28,\\\$w29,\\\$w29" } } */
+
diff --git a/gcc/testsuite/gcc.target/mips/msa-fmadd.c b/gcc/testsuite/gcc.target/mips/msa-fmadd-o32.c
similarity index 96%
rename from gcc/testsuite/gcc.target/mips/msa-fmadd.c
rename to gcc/testsuite/gcc.target/mips/msa-fmadd-o32.c
index 9265c04ff9c..843336990e4 100644
--- a/gcc/testsuite/gcc.target/mips/msa-fmadd.c
+++ b/gcc/testsuite/gcc.target/mips/msa-fmadd-o32.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-mfp64 -mhard-float -mmsa -EL -flax-vector-conversions" } */
+/* { dg-options "-mabi=32 -mfp64 -mhard-float -mmsa -EL -flax-vector-conversions" } */
/* { dg-skip-if "uses global registers" { *-*-* } { "-O0" } { "" } } */
typedef int v4i32 __attribute__ ((vector_size(16)));
--
2.11.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [MIPS][Testsuite] specify msa-fmadd.c abis
2019-07-03 6:53 [MIPS][Testsuite] specify msa-fmadd.c abis Paul Hua
@ 2019-07-03 22:57 ` Jeff Law
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2019-07-03 22:57 UTC (permalink / raw)
To: Paul Hua, gcc-patches; +Cc: Matthew Fortune
On 7/3/19 12:52 AM, Paul Hua wrote:
> Hi,
>
> The msa-fmadd.c fails on abi=64, the attached patch fixed by specify the abis.
>
> spawn -ignore SIGHUP
> /home/xuchenghua/GCC/test/gcc-r272929_obj/gcc/xgcc
> -B/home/xuchenghua/GCC/test/gcc-r272929_obj/gcc/
> /home/xuchenghua/GCC/gcc_git_trunk/gcc/testsuite/gcc.target/mips/msa-fmadd.c
> -fno-diagnostics-show-caret -fno-diagnostics-show-line-numbers
> -fdiagnostics-color=never -O1 -DNOMIPS16=__attribute__((nomips16))
> -DNOMICROMIPS=__attribute__((nomicromips))
> -DNOCOMPRESSION=__attribute__((nocompression)) -EL -mhard-float
> -mdouble-float -mfp64 -mno-mips16 -modd-spreg -mmsa
> -flax-vector-conversions -ffat-lto-objects -fno-ident -S -o
> msa-fmadd.s^M
> /home/xuchenghua/GCC/gcc_git_trunk/gcc/testsuite/gcc.target/mips/msa-fmadd.c:11:16:
> warning: call-clobbered register used for global register variable^M
> /home/xuchenghua/GCC/gcc_git_trunk/gcc/testsuite/gcc.target/mips/msa-fmadd.c:12:16:
> warning: call-clobbered register used for global register variable^M
> FAIL: gcc.target/mips/msa-fmadd.c -O1 (test for excess errors)
> Excess errors:
> /home/xuchenghua/GCC/gcc_git_trunk/gcc/testsuite/gcc.target/mips/msa-fmadd.c:11:16:
> warning: call-clobbered register used for global register variable
> /home/xuchenghua/GCC/gcc_git_trunk/gcc/testsuite/gcc.target/mips/msa-fmadd.c:12:16:
> warning: call-clobbered register used for global register variable
>
>
> Ok for commit ?
>
>
> 0001-MIPS-Testsuite-specify-msa-fmadd.c-abis.patch
>
> From 912581f71ad37b415aec06d23210109e1c778296 Mon Sep 17 00:00:00 2001
> From: Chenghua Xu <paul.hua.gm@gmail.com>
> Date: Mon, 17 Jun 2019 14:36:37 +0800
> Subject: [PATCH] [MIPS][Testsuite] specify msa-fmadd.c abis.
>
> gcc/testsuite/
>
> * gcc.target/mips/mips-fmadd.c: Rename to ...
> * gcc.target/mips/mips-fmadd-o32.c: ... Here; add abi=32.
> * gcc.target/mips/mips-fmadd-n64.c: New.
OK
jeff
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-07-03 22:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-03 6:53 [MIPS][Testsuite] specify msa-fmadd.c abis Paul Hua
2019-07-03 22:57 ` Jeff Law
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).