public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* enable sqrt insns for cdce3.c
@ 2021-03-10  5:30 Alexandre Oliva
  2021-03-10 17:11 ` Hans-Peter Nilsson
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Alexandre Oliva @ 2021-03-10  5:30 UTC (permalink / raw)
  To: gcc-patches


The test expects shrink-wrapping of the fsqrt call, but that will only
occur when there is a usable sqrt insn.

Arrange for dejagnu to add the options that enable the sqrt insn, if
one is available, and to skip the test otherwise.


H-P, this *should* obviate the mmix-specific dg-skip-if.  Would it be
easy for you to confirm that this is the case and, if so, drop it?

This was regstrapped on x86_64-linux-gnu, tested with a cross to a
ppc64-vxworks7r2 configured for a cpu that doesn't have fsqrt enabled,
and I'm now also regstrapping on ppc64-linux-gnu just to be sure.
Ok to install?


for  gcc/testsuite/ChangeLog

	* gcc.dg/cdce3.c: Add sqrt insn options.
---
 gcc/testsuite/gcc.dg/cdce3.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.dg/cdce3.c b/gcc/testsuite/gcc.dg/cdce3.c
index 601ddf055fd71..f9b3633e66a57 100644
--- a/gcc/testsuite/gcc.dg/cdce3.c
+++ b/gcc/testsuite/gcc.dg/cdce3.c
@@ -1,7 +1,8 @@
 /* { dg-do compile } */
 /* { dg-require-effective-target hard_float } */
 /* { dg-options "-O2 -fmath-errno -fdump-tree-cdce-details -fdump-tree-optimized" } */
-/* { dg-final { scan-tree-dump "cdce3.c:11: \[^\n\r]* function call is shrink-wrapped into error conditions\." "cdce" } } */
+/* { dg-add-options sqrt_insn } */
+/* { dg-final { scan-tree-dump "cdce3.c:12: \[^\n\r]* function call is shrink-wrapped into error conditions\." "cdce" } } */
 /* { dg-final { scan-tree-dump "sqrtf \\(\[^\n\r]*\\); \\\[tail call\\\]" "optimized" } } */
 /* { dg-skip-if "doesn't have a sqrtf insn" { mmix-*-* } } */
 


-- 
Alexandre Oliva, happy hacker  https://FSFLA.org/blogs/lxo/
   Free Software Activist         GNU Toolchain Engineer
        Vim, Vi, Voltei pro Emacs -- GNUlius Caesar

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

end of thread, other threads:[~2024-04-28  7:40 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-10  5:30 enable sqrt insns for cdce3.c Alexandre Oliva
2021-03-10 17:11 ` Hans-Peter Nilsson
2021-03-11 16:04   ` Alexandre Oliva
2024-04-22  9:50   ` Alexandre Oliva
2024-04-23 15:38     ` Hans-Peter Nilsson
2024-04-28  7:40       ` Alexandre Oliva
2021-03-20 15:20 ` Jeff Law
2024-04-22  9:56 ` [PATCH v2] [testsuite] require sqrt_insn effective target where needed Alexandre Oliva
2024-04-23  8:59   ` Kewen.Lin
2024-04-23  9:14     ` Iain Sandoe
2024-04-28  7:37       ` Alexandre Oliva
2024-04-24  2:15   ` Mike Stump

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