This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[COMMITTED][testsuite] Fix f16_mov_immediate_3.c


Fix and simplify the testcase so it generates dup even on latest trunk.

This fixes the failure reported in: https://gcc.gnu.org/ml/gcc-patches/2018-06/msg01799.html

Committed as obvious.

ChangeLog:
2018-06-28  Wilco Dijkstra  <wdijkstr@arm.com>

	* gcc.target/aarch64/f16_mov_immediate_3.c: Fix testcase.
--
diff --git a/gcc/testsuite/gcc.target/aarch64/f16_mov_immediate_3.c b/gcc/testsuite/gcc.target/aarch64/f16_mov_immediate_3.c
index 6dc325b10b76b2a04f7081f892ce175622eaf49d..66218e3eaac95d858245d28d0c370760012d30d8 100644
--- a/gcc/testsuite/gcc.target/aarch64/f16_mov_immediate_3.c
+++ b/gcc/testsuite/gcc.target/aarch64/f16_mov_immediate_3.c
@@ -1,18 +1,11 @@
 /* { dg-do compile } */
-/* { dg-options "-O0" } */
-
-extern __fp16 foo ();
+/* { dg-options "-O2" } */
 
 __fp16 f4 ()
 {
-  __fp16 a = 0;
-  __fp16 b = 1;
-  __fp16 c = 2;
-  __fp16 d = 4;
+  __fp16 a = 0.1;
 
-  __fp16 z = a + b;
-  z = z + c;
-  z = z - d;
+  __fp16 z = a * a;
   return z;
 }
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]