public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH v1] LoongArch: testsuite:Add the "-ffast-math" compilation option for the file vect-fmin-3.c.
@ 2023-12-29  4:00 chenxiaolong
  2023-12-30 12:15 ` Richard Sandiford
  0 siblings, 1 reply; 5+ messages in thread
From: chenxiaolong @ 2023-12-29  4:00 UTC (permalink / raw)
  To: gcc-patches
  Cc: xry111, i, xuchenghua, chenglulu, richard.sandiford, chenxiaolong

After the detection of maximum reduction is enabled on LoongArch architecture,
the regression test of GCC finds that vect-fmin-3.c fails. Currently, in the
target-supports.exp file, only aarch64,arm,riscv, and LoongArch architectures
are supported. Through analysis, the "-ffast-math" compilation option needs to
be added to the test case in order to successfully reduce using vectorization.
The original patch was submitted by author Richard Sandiford.

The initial patch information submitted is as follows:

commit e32b9eb32d7cd2d39bf9c70497890ac61b9ee14c

gcc/testsuite/ChangeLog:

	* gcc.dg/vect/vect-fmin-3.c:Adding an extra "-ffast-math" to the
        compilation option ensures that the loop can be reduced to maximum
        success.
---
 gcc/testsuite/gcc.dg/vect/vect-fmin-3.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gcc/testsuite/gcc.dg/vect/vect-fmin-3.c b/gcc/testsuite/gcc.dg/vect/vect-fmin-3.c
index 2e282ba6878..edef57925c1 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-fmin-3.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-fmin-3.c
@@ -1,4 +1,5 @@
 /* { dg-require-effective-target vect_float } */
+/* { dg-additional-options "-ffast-math" } */
 
 #include "tree-vect.h"
 
-- 
2.20.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-12-30 12:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-29  4:00 [PATCH v1] LoongArch: testsuite:Add the "-ffast-math" compilation option for the file vect-fmin-3.c chenxiaolong
2023-12-30 12:15 ` Richard Sandiford
2023-12-30 12:25   ` Xi Ruoyao
2023-12-30 12:39     ` Xi Ruoyao
2023-12-30 12:45     ` chenglulu

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).