[COMMITTED,testsuite] Fix f16_mov_immediate_3.c

Message ID HE1PR08MB1035B0CB5DB5660309AEA0D4834F0@HE1PR08MB1035.eurprd08.prod.outlook.com
State New
Headers show
Series
  • [COMMITTED,testsuite] Fix f16_mov_immediate_3.c
Related show

Commit Message

Wilco Dijkstra June 28, 2018, 4:13 p.m.
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.
--

Patch

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;
 }