1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 2; RUN: llc < %s -mcpu=corei7-avx -mtriple=x86_64-linux | FileCheck %s 3 4; A test from pifft (after SLP-vectorization) that fails when we drop the chain on newly merged loads. 5define void @cftx020(double* nocapture %a) { 6; CHECK-LABEL: cftx020: 7; CHECK: # %bb.0: # %entry 8; CHECK-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero 9; CHECK-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero 10; CHECK-NEXT: vmovhpd {{.*#+}} xmm0 = xmm0[0],mem[0] 11; CHECK-NEXT: vmovhpd {{.*#+}} xmm1 = xmm1[0],mem[0] 12; CHECK-NEXT: vaddpd %xmm1, %xmm0, %xmm0 13; CHECK-NEXT: vmovupd (%rdi), %xmm1 14; CHECK-NEXT: vmovupd %xmm0, (%rdi) 15; CHECK-NEXT: vsubpd 16(%rdi), %xmm1, %xmm0 16; CHECK-NEXT: vmovupd %xmm0, 16(%rdi) 17; CHECK-NEXT: retq 18entry: 19 %0 = load double, double* %a, align 8 20 %arrayidx1 = getelementptr inbounds double, double* %a, i64 2 21 %1 = load double, double* %arrayidx1, align 8 22 %arrayidx2 = getelementptr inbounds double, double* %a, i64 1 23 %2 = load double, double* %arrayidx2, align 8 24 %arrayidx3 = getelementptr inbounds double, double* %a, i64 3 25 %3 = load double, double* %arrayidx3, align 8 26 %4 = insertelement <2 x double> undef, double %0, i32 0 27 %5 = insertelement <2 x double> %4, double %3, i32 1 28 %6 = insertelement <2 x double> undef, double %1, i32 0 29 %7 = insertelement <2 x double> %6, double %2, i32 1 30 %8 = fadd <2 x double> %5, %7 31 %9 = bitcast double* %a to <2 x double>* 32 store <2 x double> %8, <2 x double>* %9, align 8 33 %10 = insertelement <2 x double> undef, double %0, i32 0 34 %11 = insertelement <2 x double> %10, double %2, i32 1 35 %12 = insertelement <2 x double> undef, double %1, i32 0 36 %13 = insertelement <2 x double> %12, double %3, i32 1 37 %14 = fsub <2 x double> %11, %13 38 %15 = bitcast double* %arrayidx1 to <2 x double>* 39 store <2 x double> %14, <2 x double>* %15, align 8 40 ret void 41} 42