diff mbox series

[testsuite,arm] cache fp16 hw effective-target tests

Message ID ff812301-7e4b-cd68-efb0-bf94dd1f5955@codesourcery.com
State New
Headers show
Series [testsuite,arm] cache fp16 hw effective-target tests | expand

Commit Message

Sandra Loosemore Sept. 13, 2019, 4:31 p.m. UTC
In some bare-metal environments, the tests for fp16 runtime support fail 
in a way that causes a timeout rather than immediate failure.  (E.g., 
the runtime might provide a do-nothing exception handler that just sits 
in a tight loop and never returns.)  This patch changes the 
effective-target tests for fp16 hardware support to cache the result of 
the test so that we don't have to do this more than once.  I think it 
was probably just an oversight that it wasn't done this way originally, 
since the target is hardly likely to sprout fp16 instruction support 
midway through the test run anyway.  ;-)  Anyway, test results are the 
same with this patch, they just run faster.  OK to commit?

-Sandra

Comments

Ramana Radhakrishnan Sept. 15, 2019, 3:33 p.m. UTC | #1
On Fri, Sep 13, 2019 at 5:31 PM Sandra Loosemore
<sandra@codesourcery.com> wrote:
>
> In some bare-metal environments, the tests for fp16 runtime support fail
> in a way that causes a timeout rather than immediate failure.  (E.g.,
> the runtime might provide a do-nothing exception handler that just sits
> in a tight loop and never returns.)  This patch changes the
> effective-target tests for fp16 hardware support to cache the result of
> the test so that we don't have to do this more than once.  I think it
> was probably just an oversight that it wasn't done this way originally,
> since the target is hardly likely to sprout fp16 instruction support
> midway through the test run anyway.  ;-)  Anyway, test results are the
> same with this patch, they just run faster.  OK to commit?

Ok, thanks.

Ramana

>
> -Sandra
diff mbox series

Patch

Index: gcc/testsuite/lib/target-supports.exp
===================================================================
--- gcc/testsuite/lib/target-supports.exp	(revision 275699)
+++ gcc/testsuite/lib/target-supports.exp	(working copy)
@@ -3909,7 +3909,7 @@  proc check_effective_target_arm_neon_fp1
 	return 0
     }
     global et_arm_neon_fp16_flags
-    check_runtime_nocache arm_neon_fp16_hw {
+    check_runtime arm_neon_fp16_hw {
 	int
 	main (int argc, char **argv)
 	{
@@ -4162,7 +4162,7 @@  proc check_effective_target_arm_fp16_hw
 	return 0
     }
     global et_arm_fp16_flags
-    check_runtime_nocache arm_fp16_hw {
+    check_runtime arm_fp16_hw {
 	int
 	main (int argc, char **argv)
 	{