summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/pr49002-1.c
blob: 646fb2bceb6e4a086ff1245ce6bb82014311995a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* PR target/49002 */
/* { dg-do compile } */
/* { dg-options "-O -mavx" } */

#include <immintrin.h>

void foo(const __m128d *from, __m256d *to, int s)
{
  __m256d var = _mm256_castpd128_pd256(from[0]);
  var = _mm256_insertf128_pd(var, from[s], 1);
  to[0] = var;
}

/* Ensure we load into xmm, not ymm.  */
/* { dg-final { scan-assembler-not "vmovapd\[\t \]*\[^,\]*,\[\t \]*%ymm" } } */
/* { dg-final { scan-assembler "vmovap\[ds\]\[\t \]*\[^,\]*,\[\t \]*%xmm" } } */