/* { dg-options "-O2" } */
/* { dg-add-options arm_v8_2a_fp16_scalar } */
/* { dg-additional-options "-mfloat-abi=hard" } */
-
+/* { dg-final { check-function-bodies "**" "" } } */
+
+/*
+**test_load_1:
+** ...
+** vld1.16 {d[0-9]+\[[0-9]+\]}, \[r[0-9]+\]
+** ...
+*/
__fp16
test_load_1 (__fp16* a)
{
return *a;
}
+/*
+**test_load_2:
+** ...
+** vld1.16 {d[0-9]+\[[0-9]+\]}, \[r[0-9]+\]
+** ...
+*/
__fp16
test_load_2 (__fp16* a, int i)
{
return a[i];
}
-
+/*
+**test_store_1:
+** ...
+** vst1.16 {d[0-9]+\[[0-9]+\]}, \[r[0-9]+\]
+** ...
+*/
void
test_store_1 (__fp16* a, __fp16 b)
{
*a = b;
}
+/*
+**test_store_2:
+** ...
+** vst1.16 {d[0-9]+\[[0-9]+\]}, \[r[0-9]+\]
+** ...
+*/
void
test_store_2 (__fp16* a, int i, __fp16 b)
{
a[i] = b;
}
-
+/*
+**test_load_store_1:
+** ...
+** vld1.16 {d[0-9]+\[[0-9]+\]}, \[r[0-9]+\]
+** ...
+** vst1.16 {d[0-9]+\[[0-9]+\]}, \[r[0-9]+\]
+** ...
+*/
__fp16
test_load_store_1 (__fp16* a, int i, __fp16* b)
{
a[i] = b[i];
}
+/*
+**test_load_store_2:
+** ...
+** vld1.16 {d[0-9]+\[[0-9]+\]}, \[r[0-9]+\]
+** ...
+** vst1.16 {d[0-9]+\[[0-9]+\]}, \[r[0-9]+\]
+** ...
+*/
__fp16
test_load_store_2 (__fp16* a, int i, __fp16* b)
{
return a[i];
}
-/* { dg-final { scan-assembler-times {vst1\.16\t\{d[0-9]+\[[0-9]+\]\}, \[r[0-9]+\]} 3 } } */
-/* { dg-final { scan-assembler-times {vld1\.16\t\{d[0-9]+\[[0-9]+\]\}, \[r[0-9]+\]} 3 } } */
-
__fp16
test_select_1 (int sel, __fp16 a, __fp16 b)
{