ada: Avoid doing unnecessary work in elaborate_expression_2
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / avx512vl-vbroadcast-1.c
blob8a74675f4dc4b9b156e554b56c1253393255dccd
1 /* { dg-do compile { target { ! ia32 } } } */
2 /* { dg-options "-O2 -mavx512vl" } */
4 #include <x86intrin.h>
6 void
7 f1 (__m128d x)
9 register __m128d a __asm ("xmm16");
10 register __m256d b __asm ("xmm17");
11 a = x;
12 asm volatile ("" : "+v" (a));
13 b = _mm256_broadcastsd_pd (a);
14 asm volatile ("" : "+v" (b));
17 /* { dg-final { scan-assembler "vbroadcastsd\[^\n\r]*(xmm16\[^\n\r]*ymm17|ymm17\[^\n\r]*xmm16)" } } */
19 void
20 f2 (float const *x)
22 register __m128 a __asm ("xmm16");
23 a = _mm_broadcast_ss (x);
24 asm volatile ("" : "+v" (a));
27 /* { dg-final { scan-assembler "vbroadcastss\[^\n\r]*(\\)\[^\n\r]*xmm16|xmm16\[^\n\r]*PTR)" } } */
29 void
30 f3 (float x)
32 register float a __asm ("xmm16");
33 register __m128 b __asm ("xmm17");
34 a = x;
35 asm volatile ("" : "+v" (a));
36 float c = a;
37 b = _mm_broadcast_ss (&c);
38 asm volatile ("" : "+v" (b));
41 /* { dg-final { scan-assembler "vbroadcastss\[^\n\r]*xmm1\[67]\[^\n\r]*xmm1\[67]" } } */