• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s -mcpu=corei7-avx -mtriple=x86_64-linux | FileCheck %s
2
3; CHECK-LABEL: cftx020:
4; CHECK: vmovsd  (%rdi), %xmm{{.*}}
5; CHECK-NEXT: vmovsd  16(%rdi), %xmm{{.*}}
6; CHECK-NEXT: vmovhpd  24(%rdi), %xmm{{.*}}
7; CHECK-NEXT: vmovhpd  8(%rdi), %xmm{{.*}}
8; CHECK: vmovupd %xmm{{.*}}, (%rdi)
9; CHECK-NEXT: vmovupd %xmm{{.*}}, 16(%rdi)
10; CHECK: ret
11
12; A test from pifft (after SLP-vectorization) that fails when we drop the chain on newly merged loads.
13define void @cftx020(double* nocapture %a) {
14entry:
15  %0 = load double, double* %a, align 8
16  %arrayidx1 = getelementptr inbounds double, double* %a, i64 2
17  %1 = load double, double* %arrayidx1, align 8
18  %arrayidx2 = getelementptr inbounds double, double* %a, i64 1
19  %2 = load double, double* %arrayidx2, align 8
20  %arrayidx3 = getelementptr inbounds double, double* %a, i64 3
21  %3 = load double, double* %arrayidx3, align 8
22  %4 = insertelement <2 x double> undef, double %0, i32 0
23  %5 = insertelement <2 x double> %4, double %3, i32 1
24  %6 = insertelement <2 x double> undef, double %1, i32 0
25  %7 = insertelement <2 x double> %6, double %2, i32 1
26  %8 = fadd <2 x double> %5, %7
27  %9 = bitcast double* %a to <2 x double>*
28  store <2 x double> %8, <2 x double>* %9, align 8
29  %10 = insertelement <2 x double> undef, double %0, i32 0
30  %11 = insertelement <2 x double> %10, double %2, i32 1
31  %12 = insertelement <2 x double> undef, double %1, i32 0
32  %13 = insertelement <2 x double> %12, double %3, i32 1
33  %14 = fsub <2 x double> %11, %13
34  %15 = bitcast double* %arrayidx1 to <2 x double>*
35  store <2 x double> %14, <2 x double>* %15, align 8
36  ret void
37}
38