1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -passes=slp-vectorizer -S -mtriple=x86_64-unknown-linux-gnu -mcpu=bdver2 < %s | FileCheck %s
4 define dso_local void @rftbsub(ptr %a) local_unnamed_addr #0 {
5 ; CHECK-LABEL: @rftbsub(
7 ; CHECK-NEXT: [[ARRAYIDX6:%.*]] = getelementptr inbounds double, ptr [[A:%.*]], i64 2
8 ; CHECK-NEXT: [[SUB22:%.*]] = fsub double undef, undef
9 ; CHECK-NEXT: [[TMP1:%.*]] = load <2 x double>, ptr [[ARRAYIDX6]], align 8
10 ; CHECK-NEXT: [[TMP2:%.*]] = extractelement <2 x double> [[TMP1]], i32 1
11 ; CHECK-NEXT: [[ADD16:%.*]] = fadd double [[TMP2]], undef
12 ; CHECK-NEXT: [[MUL18:%.*]] = fmul double undef, [[ADD16]]
13 ; CHECK-NEXT: [[ADD19:%.*]] = fadd double undef, [[MUL18]]
14 ; CHECK-NEXT: [[TMP3:%.*]] = insertelement <2 x double> poison, double [[ADD19]], i32 0
15 ; CHECK-NEXT: [[TMP4:%.*]] = insertelement <2 x double> [[TMP3]], double [[SUB22]], i32 1
16 ; CHECK-NEXT: [[TMP5:%.*]] = fsub <2 x double> [[TMP1]], [[TMP4]]
17 ; CHECK-NEXT: store <2 x double> [[TMP5]], ptr [[ARRAYIDX6]], align 8
18 ; CHECK-NEXT: unreachable
21 %arrayidx6 = getelementptr inbounds double, ptr %a, i64 2
22 %0 = load double, ptr %arrayidx6, align 8
23 %1 = or disjoint i64 2, 1
24 %arrayidx12 = getelementptr inbounds double, ptr %a, i64 %1
25 %2 = load double, ptr %arrayidx12, align 8
26 %add16 = fadd double %2, undef
27 %mul18 = fmul double undef, %add16
28 %add19 = fadd double undef, %mul18
29 %sub22 = fsub double undef, undef
30 %sub25 = fsub double %0, %add19
31 store double %sub25, ptr %arrayidx6, align 8
32 %sub29 = fsub double %2, %sub22
33 store double %sub29, ptr %arrayidx12, align 8