433 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt < %s -mtriple=x86_64-unknown -passes=slp-vectorizer -S | FileCheck %s --check-prefixes=CHECK,SSE3; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=corei7-avx -passes=slp-vectorizer -S | FileCheck %s --check-prefixes=CHECK,AVX4; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=bdver1 -passes=slp-vectorizer -S | FileCheck %s --check-prefixes=CHECK,AVX,AVX2565; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=core-avx2 -passes=slp-vectorizer -S | FileCheck %s --check-prefixes=CHECK,AVX,AVX2566; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=skylake-avx512 -mattr=-prefer-256-bit -passes=slp-vectorizer -S | FileCheck %s --check-prefixes=CHECK,AVX,AVX5127; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=skylake-avx512 -mattr=+prefer-256-bit -passes=slp-vectorizer -S | FileCheck %s --check-prefixes=CHECK,AVX,AVX2568 9target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"10 11@srcA64 = common global [8 x double] zeroinitializer, align 6412@srcB64 = common global [8 x double] zeroinitializer, align 6413@srcC64 = common global [8 x double] zeroinitializer, align 6414@srcA32 = common global [16 x float] zeroinitializer, align 6415@srcB32 = common global [16 x float] zeroinitializer, align 6416@srcC32 = common global [16 x float] zeroinitializer, align 6417@dst64 = common global [8 x double] zeroinitializer, align 6418@dst32 = common global [16 x float] zeroinitializer, align 6419 20declare float @llvm.fmuladd.f32(float, float, float)21declare double @llvm.fmuladd.f64(double, double, double)22 23;24; fmuladd25;26 27define void @fmuladd_2f64() #0 {28; CHECK-LABEL: @fmuladd_2f64(29; CHECK-NEXT: [[TMP1:%.*]] = load <2 x double>, ptr @srcA64, align 830; CHECK-NEXT: [[TMP2:%.*]] = load <2 x double>, ptr @srcB64, align 831; CHECK-NEXT: [[TMP3:%.*]] = load <2 x double>, ptr @srcC64, align 832; CHECK-NEXT: [[TMP4:%.*]] = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> [[TMP1]], <2 x double> [[TMP2]], <2 x double> [[TMP3]])33; CHECK-NEXT: store <2 x double> [[TMP4]], ptr @dst64, align 834; CHECK-NEXT: ret void35;36 %a0 = load double, ptr @srcA64, align 837 %a1 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 1), align 838 %b0 = load double, ptr @srcB64, align 839 %b1 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 1), align 840 %c0 = load double, ptr @srcC64, align 841 %c1 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 1), align 842 %fmuladd0 = call double @llvm.fmuladd.f64(double %a0, double %b0, double %c0)43 %fmuladd1 = call double @llvm.fmuladd.f64(double %a1, double %b1, double %c1)44 store double %fmuladd0, ptr @dst64, align 845 store double %fmuladd1, ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 1), align 846 ret void47}48 49define void @fmuladd_2f64_freeze() #0 {50; CHECK-LABEL: @fmuladd_2f64_freeze(51; CHECK-NEXT: [[TMP1:%.*]] = load <2 x double>, ptr @srcA64, align 852; CHECK-NEXT: [[TMP2:%.*]] = load <2 x double>, ptr @srcB64, align 853; CHECK-NEXT: [[TMP3:%.*]] = load <2 x double>, ptr @srcC64, align 854; CHECK-NEXT: [[TMP4:%.*]] = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> [[TMP1]], <2 x double> [[TMP2]], <2 x double> [[TMP3]])55; CHECK-NEXT: [[TMP5:%.*]] = freeze <2 x double> [[TMP4]]56; CHECK-NEXT: store <2 x double> [[TMP5]], ptr @dst64, align 857; CHECK-NEXT: ret void58;59 %a0 = load double, ptr @srcA64, align 860 %a1 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 1), align 861 %b0 = load double, ptr @srcB64, align 862 %b1 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 1), align 863 %c0 = load double, ptr @srcC64, align 864 %c1 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 1), align 865 %fmuladd0 = call double @llvm.fmuladd.f64(double %a0, double %b0, double %c0)66 %fmuladd1 = call double @llvm.fmuladd.f64(double %a1, double %b1, double %c1)67 %freeze0 = freeze double %fmuladd068 %freeze1 = freeze double %fmuladd169 store double %freeze0, ptr @dst64, align 870 store double %freeze1, ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 1), align 871 ret void72}73 74define void @fmuladd_4f64() #0 {75; SSE-LABEL: @fmuladd_4f64(76; SSE-NEXT: [[TMP1:%.*]] = load <2 x double>, ptr @srcA64, align 877; SSE-NEXT: [[TMP2:%.*]] = load <2 x double>, ptr @srcB64, align 878; SSE-NEXT: [[TMP3:%.*]] = load <2 x double>, ptr @srcC64, align 879; SSE-NEXT: [[TMP4:%.*]] = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> [[TMP1]], <2 x double> [[TMP2]], <2 x double> [[TMP3]])80; SSE-NEXT: store <2 x double> [[TMP4]], ptr @dst64, align 881; SSE-NEXT: [[TMP5:%.*]] = load <2 x double>, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 2), align 882; SSE-NEXT: [[TMP6:%.*]] = load <2 x double>, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 2), align 883; SSE-NEXT: [[TMP7:%.*]] = load <2 x double>, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 2), align 884; SSE-NEXT: [[TMP8:%.*]] = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> [[TMP5]], <2 x double> [[TMP6]], <2 x double> [[TMP7]])85; SSE-NEXT: store <2 x double> [[TMP8]], ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 2), align 886; SSE-NEXT: ret void87;88; AVX-LABEL: @fmuladd_4f64(89; AVX-NEXT: [[TMP1:%.*]] = load <4 x double>, ptr @srcA64, align 890; AVX-NEXT: [[TMP2:%.*]] = load <4 x double>, ptr @srcB64, align 891; AVX-NEXT: [[TMP3:%.*]] = load <4 x double>, ptr @srcC64, align 892; AVX-NEXT: [[TMP4:%.*]] = call <4 x double> @llvm.fmuladd.v4f64(<4 x double> [[TMP1]], <4 x double> [[TMP2]], <4 x double> [[TMP3]])93; AVX-NEXT: store <4 x double> [[TMP4]], ptr @dst64, align 894; AVX-NEXT: ret void95;96 %a0 = load double, ptr @srcA64, align 897 %a1 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 1), align 898 %a2 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 2), align 899 %a3 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 3), align 8100 %b0 = load double, ptr @srcB64, align 8101 %b1 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 1), align 8102 %b2 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 2), align 8103 %b3 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 3), align 8104 %c0 = load double, ptr @srcC64, align 8105 %c1 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 1), align 8106 %c2 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 2), align 8107 %c3 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 3), align 8108 %fmuladd0 = call double @llvm.fmuladd.f64(double %a0, double %b0, double %c0)109 %fmuladd1 = call double @llvm.fmuladd.f64(double %a1, double %b1, double %c1)110 %fmuladd2 = call double @llvm.fmuladd.f64(double %a2, double %b2, double %c2)111 %fmuladd3 = call double @llvm.fmuladd.f64(double %a3, double %b3, double %c3)112 store double %fmuladd0, ptr @dst64, align 8113 store double %fmuladd1, ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 1), align 8114 store double %fmuladd2, ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 2), align 8115 store double %fmuladd3, ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 3), align 8116 ret void117}118 119define void @fmuladd_8f64() #0 {120; SSE-LABEL: @fmuladd_8f64(121; SSE-NEXT: [[TMP1:%.*]] = load <2 x double>, ptr @srcA64, align 4122; SSE-NEXT: [[TMP2:%.*]] = load <2 x double>, ptr @srcB64, align 4123; SSE-NEXT: [[TMP3:%.*]] = load <2 x double>, ptr @srcC64, align 4124; SSE-NEXT: [[TMP4:%.*]] = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> [[TMP1]], <2 x double> [[TMP2]], <2 x double> [[TMP3]])125; SSE-NEXT: store <2 x double> [[TMP4]], ptr @dst64, align 4126; SSE-NEXT: [[TMP5:%.*]] = load <2 x double>, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 2), align 4127; SSE-NEXT: [[TMP6:%.*]] = load <2 x double>, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 2), align 4128; SSE-NEXT: [[TMP7:%.*]] = load <2 x double>, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 2), align 4129; SSE-NEXT: [[TMP8:%.*]] = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> [[TMP5]], <2 x double> [[TMP6]], <2 x double> [[TMP7]])130; SSE-NEXT: store <2 x double> [[TMP8]], ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 2), align 4131; SSE-NEXT: [[TMP9:%.*]] = load <2 x double>, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 4), align 4132; SSE-NEXT: [[TMP10:%.*]] = load <2 x double>, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 4), align 4133; SSE-NEXT: [[TMP11:%.*]] = load <2 x double>, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 4), align 4134; SSE-NEXT: [[TMP12:%.*]] = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> [[TMP9]], <2 x double> [[TMP10]], <2 x double> [[TMP11]])135; SSE-NEXT: store <2 x double> [[TMP12]], ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 4), align 4136; SSE-NEXT: [[TMP13:%.*]] = load <2 x double>, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 6), align 4137; SSE-NEXT: [[TMP14:%.*]] = load <2 x double>, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 6), align 4138; SSE-NEXT: [[TMP15:%.*]] = load <2 x double>, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 6), align 4139; SSE-NEXT: [[TMP16:%.*]] = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> [[TMP13]], <2 x double> [[TMP14]], <2 x double> [[TMP15]])140; SSE-NEXT: store <2 x double> [[TMP16]], ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 6), align 4141; SSE-NEXT: ret void142;143; AVX256-LABEL: @fmuladd_8f64(144; AVX256-NEXT: [[TMP1:%.*]] = load <4 x double>, ptr @srcA64, align 4145; AVX256-NEXT: [[TMP2:%.*]] = load <4 x double>, ptr @srcB64, align 4146; AVX256-NEXT: [[TMP3:%.*]] = load <4 x double>, ptr @srcC64, align 4147; AVX256-NEXT: [[TMP4:%.*]] = call <4 x double> @llvm.fmuladd.v4f64(<4 x double> [[TMP1]], <4 x double> [[TMP2]], <4 x double> [[TMP3]])148; AVX256-NEXT: store <4 x double> [[TMP4]], ptr @dst64, align 4149; AVX256-NEXT: [[TMP5:%.*]] = load <4 x double>, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 4), align 4150; AVX256-NEXT: [[TMP6:%.*]] = load <4 x double>, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 4), align 4151; AVX256-NEXT: [[TMP7:%.*]] = load <4 x double>, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 4), align 4152; AVX256-NEXT: [[TMP8:%.*]] = call <4 x double> @llvm.fmuladd.v4f64(<4 x double> [[TMP5]], <4 x double> [[TMP6]], <4 x double> [[TMP7]])153; AVX256-NEXT: store <4 x double> [[TMP8]], ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 4), align 4154; AVX256-NEXT: ret void155;156; AVX512-LABEL: @fmuladd_8f64(157; AVX512-NEXT: [[TMP1:%.*]] = load <8 x double>, ptr @srcA64, align 4158; AVX512-NEXT: [[TMP2:%.*]] = load <8 x double>, ptr @srcB64, align 4159; AVX512-NEXT: [[TMP3:%.*]] = load <8 x double>, ptr @srcC64, align 4160; AVX512-NEXT: [[TMP4:%.*]] = call <8 x double> @llvm.fmuladd.v8f64(<8 x double> [[TMP1]], <8 x double> [[TMP2]], <8 x double> [[TMP3]])161; AVX512-NEXT: store <8 x double> [[TMP4]], ptr @dst64, align 4162; AVX512-NEXT: ret void163;164 %a0 = load double, ptr @srcA64, align 4165 %a1 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 1), align 4166 %a2 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 2), align 4167 %a3 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 3), align 4168 %a4 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 4), align 4169 %a5 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 5), align 4170 %a6 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 6), align 4171 %a7 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcA64, i32 0, i64 7), align 4172 %b0 = load double, ptr @srcB64, align 4173 %b1 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 1), align 4174 %b2 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 2), align 4175 %b3 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 3), align 4176 %b4 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 4), align 4177 %b5 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 5), align 4178 %b6 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 6), align 4179 %b7 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcB64, i32 0, i64 7), align 4180 %c0 = load double, ptr @srcC64, align 4181 %c1 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 1), align 4182 %c2 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 2), align 4183 %c3 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 3), align 4184 %c4 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 4), align 4185 %c5 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 5), align 4186 %c6 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 6), align 4187 %c7 = load double, ptr getelementptr inbounds ([8 x double], ptr @srcC64, i32 0, i64 7), align 4188 %fmuladd0 = call double @llvm.fmuladd.f64(double %a0, double %b0, double %c0)189 %fmuladd1 = call double @llvm.fmuladd.f64(double %a1, double %b1, double %c1)190 %fmuladd2 = call double @llvm.fmuladd.f64(double %a2, double %b2, double %c2)191 %fmuladd3 = call double @llvm.fmuladd.f64(double %a3, double %b3, double %c3)192 %fmuladd4 = call double @llvm.fmuladd.f64(double %a4, double %b4, double %c4)193 %fmuladd5 = call double @llvm.fmuladd.f64(double %a5, double %b5, double %c5)194 %fmuladd6 = call double @llvm.fmuladd.f64(double %a6, double %b6, double %c6)195 %fmuladd7 = call double @llvm.fmuladd.f64(double %a7, double %b7, double %c7)196 store double %fmuladd0, ptr @dst64, align 4197 store double %fmuladd1, ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 1), align 4198 store double %fmuladd2, ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 2), align 4199 store double %fmuladd3, ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 3), align 4200 store double %fmuladd4, ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 4), align 4201 store double %fmuladd5, ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 5), align 4202 store double %fmuladd6, ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 6), align 4203 store double %fmuladd7, ptr getelementptr inbounds ([8 x double], ptr @dst64, i32 0, i64 7), align 4204 ret void205}206 207define void @fmuladd_4f32() #0 {208; CHECK-LABEL: @fmuladd_4f32(209; CHECK-NEXT: [[TMP1:%.*]] = load <4 x float>, ptr @srcA32, align 4210; CHECK-NEXT: [[TMP2:%.*]] = load <4 x float>, ptr @srcB32, align 4211; CHECK-NEXT: [[TMP3:%.*]] = load <4 x float>, ptr @srcC32, align 4212; CHECK-NEXT: [[TMP4:%.*]] = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> [[TMP1]], <4 x float> [[TMP2]], <4 x float> [[TMP3]])213; CHECK-NEXT: store <4 x float> [[TMP4]], ptr @dst32, align 4214; CHECK-NEXT: ret void215;216 %a0 = load float, ptr @srcA32, align 4217 %a1 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 1), align 4218 %a2 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 2), align 4219 %a3 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 3), align 4220 %b0 = load float, ptr @srcB32, align 4221 %b1 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 1), align 4222 %b2 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 2), align 4223 %b3 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 3), align 4224 %c0 = load float, ptr @srcC32, align 4225 %c1 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 1), align 4226 %c2 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 2), align 4227 %c3 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 3), align 4228 %fmuladd0 = call float @llvm.fmuladd.f32(float %a0, float %b0, float %c0)229 %fmuladd1 = call float @llvm.fmuladd.f32(float %a1, float %b1, float %c1)230 %fmuladd2 = call float @llvm.fmuladd.f32(float %a2, float %b2, float %c2)231 %fmuladd3 = call float @llvm.fmuladd.f32(float %a3, float %b3, float %c3)232 store float %fmuladd0, ptr @dst32, align 4233 store float %fmuladd1, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 1), align 4234 store float %fmuladd2, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 2), align 4235 store float %fmuladd3, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 3), align 4236 ret void237}238 239define void @fmuladd_8f32() #0 {240; SSE-LABEL: @fmuladd_8f32(241; SSE-NEXT: [[TMP1:%.*]] = load <4 x float>, ptr @srcA32, align 4242; SSE-NEXT: [[TMP2:%.*]] = load <4 x float>, ptr @srcB32, align 4243; SSE-NEXT: [[TMP3:%.*]] = load <4 x float>, ptr @srcC32, align 4244; SSE-NEXT: [[TMP4:%.*]] = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> [[TMP1]], <4 x float> [[TMP2]], <4 x float> [[TMP3]])245; SSE-NEXT: store <4 x float> [[TMP4]], ptr @dst32, align 4246; SSE-NEXT: [[TMP5:%.*]] = load <4 x float>, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 4), align 4247; SSE-NEXT: [[TMP6:%.*]] = load <4 x float>, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 4), align 4248; SSE-NEXT: [[TMP7:%.*]] = load <4 x float>, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 4), align 4249; SSE-NEXT: [[TMP8:%.*]] = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> [[TMP5]], <4 x float> [[TMP6]], <4 x float> [[TMP7]])250; SSE-NEXT: store <4 x float> [[TMP8]], ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 4), align 4251; SSE-NEXT: ret void252;253; AVX-LABEL: @fmuladd_8f32(254; AVX-NEXT: [[TMP1:%.*]] = load <8 x float>, ptr @srcA32, align 4255; AVX-NEXT: [[TMP2:%.*]] = load <8 x float>, ptr @srcB32, align 4256; AVX-NEXT: [[TMP3:%.*]] = load <8 x float>, ptr @srcC32, align 4257; AVX-NEXT: [[TMP4:%.*]] = call <8 x float> @llvm.fmuladd.v8f32(<8 x float> [[TMP1]], <8 x float> [[TMP2]], <8 x float> [[TMP3]])258; AVX-NEXT: store <8 x float> [[TMP4]], ptr @dst32, align 4259; AVX-NEXT: ret void260;261 %a0 = load float, ptr @srcA32, align 4262 %a1 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 1), align 4263 %a2 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 2), align 4264 %a3 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 3), align 4265 %a4 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 4), align 4266 %a5 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 5), align 4267 %a6 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 6), align 4268 %a7 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 7), align 4269 %b0 = load float, ptr @srcB32, align 4270 %b1 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 1), align 4271 %b2 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 2), align 4272 %b3 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 3), align 4273 %b4 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 4), align 4274 %b5 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 5), align 4275 %b6 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 6), align 4276 %b7 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 7), align 4277 %c0 = load float, ptr @srcC32, align 4278 %c1 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 1), align 4279 %c2 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 2), align 4280 %c3 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 3), align 4281 %c4 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 4), align 4282 %c5 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 5), align 4283 %c6 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 6), align 4284 %c7 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 7), align 4285 %fmuladd0 = call float @llvm.fmuladd.f32(float %a0, float %b0, float %c0)286 %fmuladd1 = call float @llvm.fmuladd.f32(float %a1, float %b1, float %c1)287 %fmuladd2 = call float @llvm.fmuladd.f32(float %a2, float %b2, float %c2)288 %fmuladd3 = call float @llvm.fmuladd.f32(float %a3, float %b3, float %c3)289 %fmuladd4 = call float @llvm.fmuladd.f32(float %a4, float %b4, float %c4)290 %fmuladd5 = call float @llvm.fmuladd.f32(float %a5, float %b5, float %c5)291 %fmuladd6 = call float @llvm.fmuladd.f32(float %a6, float %b6, float %c6)292 %fmuladd7 = call float @llvm.fmuladd.f32(float %a7, float %b7, float %c7)293 store float %fmuladd0, ptr @dst32, align 4294 store float %fmuladd1, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 1), align 4295 store float %fmuladd2, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 2), align 4296 store float %fmuladd3, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 3), align 4297 store float %fmuladd4, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 4), align 4298 store float %fmuladd5, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 5), align 4299 store float %fmuladd6, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 6), align 4300 store float %fmuladd7, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 7), align 4301 ret void302}303 304define void @fmuladd_16f32() #0 {305; SSE-LABEL: @fmuladd_16f32(306; SSE-NEXT: [[TMP1:%.*]] = load <4 x float>, ptr @srcA32, align 4307; SSE-NEXT: [[TMP2:%.*]] = load <4 x float>, ptr @srcB32, align 4308; SSE-NEXT: [[TMP3:%.*]] = load <4 x float>, ptr @srcC32, align 4309; SSE-NEXT: [[TMP4:%.*]] = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> [[TMP1]], <4 x float> [[TMP2]], <4 x float> [[TMP3]])310; SSE-NEXT: store <4 x float> [[TMP4]], ptr @dst32, align 4311; SSE-NEXT: [[TMP5:%.*]] = load <4 x float>, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 4), align 4312; SSE-NEXT: [[TMP6:%.*]] = load <4 x float>, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 4), align 4313; SSE-NEXT: [[TMP7:%.*]] = load <4 x float>, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 4), align 4314; SSE-NEXT: [[TMP8:%.*]] = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> [[TMP5]], <4 x float> [[TMP6]], <4 x float> [[TMP7]])315; SSE-NEXT: store <4 x float> [[TMP8]], ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 4), align 4316; SSE-NEXT: [[TMP9:%.*]] = load <4 x float>, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 8), align 4317; SSE-NEXT: [[TMP10:%.*]] = load <4 x float>, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 8), align 4318; SSE-NEXT: [[TMP11:%.*]] = load <4 x float>, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 8), align 4319; SSE-NEXT: [[TMP12:%.*]] = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> [[TMP9]], <4 x float> [[TMP10]], <4 x float> [[TMP11]])320; SSE-NEXT: store <4 x float> [[TMP12]], ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 8), align 4321; SSE-NEXT: [[TMP13:%.*]] = load <4 x float>, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 12), align 4322; SSE-NEXT: [[TMP14:%.*]] = load <4 x float>, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 12), align 4323; SSE-NEXT: [[TMP15:%.*]] = load <4 x float>, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 12), align 4324; SSE-NEXT: [[TMP16:%.*]] = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> [[TMP13]], <4 x float> [[TMP14]], <4 x float> [[TMP15]])325; SSE-NEXT: store <4 x float> [[TMP16]], ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 12), align 4326; SSE-NEXT: ret void327;328; AVX256-LABEL: @fmuladd_16f32(329; AVX256-NEXT: [[TMP1:%.*]] = load <8 x float>, ptr @srcA32, align 4330; AVX256-NEXT: [[TMP2:%.*]] = load <8 x float>, ptr @srcB32, align 4331; AVX256-NEXT: [[TMP3:%.*]] = load <8 x float>, ptr @srcC32, align 4332; AVX256-NEXT: [[TMP4:%.*]] = call <8 x float> @llvm.fmuladd.v8f32(<8 x float> [[TMP1]], <8 x float> [[TMP2]], <8 x float> [[TMP3]])333; AVX256-NEXT: store <8 x float> [[TMP4]], ptr @dst32, align 4334; AVX256-NEXT: [[TMP5:%.*]] = load <8 x float>, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 8), align 4335; AVX256-NEXT: [[TMP6:%.*]] = load <8 x float>, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 8), align 4336; AVX256-NEXT: [[TMP7:%.*]] = load <8 x float>, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 8), align 4337; AVX256-NEXT: [[TMP8:%.*]] = call <8 x float> @llvm.fmuladd.v8f32(<8 x float> [[TMP5]], <8 x float> [[TMP6]], <8 x float> [[TMP7]])338; AVX256-NEXT: store <8 x float> [[TMP8]], ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 8), align 4339; AVX256-NEXT: ret void340;341; AVX512-LABEL: @fmuladd_16f32(342; AVX512-NEXT: [[TMP1:%.*]] = load <16 x float>, ptr @srcA32, align 4343; AVX512-NEXT: [[TMP2:%.*]] = load <16 x float>, ptr @srcB32, align 4344; AVX512-NEXT: [[TMP3:%.*]] = load <16 x float>, ptr @srcC32, align 4345; AVX512-NEXT: [[TMP4:%.*]] = call <16 x float> @llvm.fmuladd.v16f32(<16 x float> [[TMP1]], <16 x float> [[TMP2]], <16 x float> [[TMP3]])346; AVX512-NEXT: store <16 x float> [[TMP4]], ptr @dst32, align 4347; AVX512-NEXT: ret void348;349 %a0 = load float, ptr @srcA32, align 4350 %a1 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 1), align 4351 %a2 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 2), align 4352 %a3 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 3), align 4353 %a4 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 4), align 4354 %a5 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 5), align 4355 %a6 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 6), align 4356 %a7 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 7), align 4357 %a8 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 8), align 4358 %a9 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 9), align 4359 %a10 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 10), align 4360 %a11 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 11), align 4361 %a12 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 12), align 4362 %a13 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 13), align 4363 %a14 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 14), align 4364 %a15 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcA32, i32 0, i64 15), align 4365 %b0 = load float, ptr @srcB32, align 4366 %b1 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 1), align 4367 %b2 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 2), align 4368 %b3 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 3), align 4369 %b4 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 4), align 4370 %b5 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 5), align 4371 %b6 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 6), align 4372 %b7 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 7), align 4373 %b8 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 8), align 4374 %b9 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 9), align 4375 %b10 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 10), align 4376 %b11 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 11), align 4377 %b12 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 12), align 4378 %b13 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 13), align 4379 %b14 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 14), align 4380 %b15 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcB32, i32 0, i64 15), align 4381 %c0 = load float, ptr @srcC32, align 4382 %c1 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 1), align 4383 %c2 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 2), align 4384 %c3 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 3), align 4385 %c4 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 4), align 4386 %c5 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 5), align 4387 %c6 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 6), align 4388 %c7 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 7), align 4389 %c8 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 8), align 4390 %c9 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 9), align 4391 %c10 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 10), align 4392 %c11 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 11), align 4393 %c12 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 12), align 4394 %c13 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 13), align 4395 %c14 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 14), align 4396 %c15 = load float, ptr getelementptr inbounds ([16 x float], ptr @srcC32, i32 0, i64 15), align 4397 %fmuladd0 = call float @llvm.fmuladd.f32(float %a0 , float %b0 , float %c0 )398 %fmuladd1 = call float @llvm.fmuladd.f32(float %a1 , float %b1 , float %c1 )399 %fmuladd2 = call float @llvm.fmuladd.f32(float %a2 , float %b2 , float %c2 )400 %fmuladd3 = call float @llvm.fmuladd.f32(float %a3 , float %b3 , float %c3 )401 %fmuladd4 = call float @llvm.fmuladd.f32(float %a4 , float %b4 , float %c4 )402 %fmuladd5 = call float @llvm.fmuladd.f32(float %a5 , float %b5 , float %c5 )403 %fmuladd6 = call float @llvm.fmuladd.f32(float %a6 , float %b6 , float %c6 )404 %fmuladd7 = call float @llvm.fmuladd.f32(float %a7 , float %b7 , float %c7 )405 %fmuladd8 = call float @llvm.fmuladd.f32(float %a8 , float %b8 , float %c8 )406 %fmuladd9 = call float @llvm.fmuladd.f32(float %a9 , float %b9 , float %c9 )407 %fmuladd10 = call float @llvm.fmuladd.f32(float %a10, float %b10, float %c10)408 %fmuladd11 = call float @llvm.fmuladd.f32(float %a11, float %b11, float %c11)409 %fmuladd12 = call float @llvm.fmuladd.f32(float %a12, float %b12, float %c12)410 %fmuladd13 = call float @llvm.fmuladd.f32(float %a13, float %b13, float %c13)411 %fmuladd14 = call float @llvm.fmuladd.f32(float %a14, float %b14, float %c14)412 %fmuladd15 = call float @llvm.fmuladd.f32(float %a15, float %b15, float %c15)413 store float %fmuladd0 , ptr @dst32, align 4414 store float %fmuladd1 , ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 1), align 4415 store float %fmuladd2 , ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 2), align 4416 store float %fmuladd3 , ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 3), align 4417 store float %fmuladd4 , ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 4), align 4418 store float %fmuladd5 , ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 5), align 4419 store float %fmuladd6 , ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 6), align 4420 store float %fmuladd7 , ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 7), align 4421 store float %fmuladd8 , ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 8), align 4422 store float %fmuladd9 , ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 9), align 4423 store float %fmuladd10, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 10), align 4424 store float %fmuladd11, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 11), align 4425 store float %fmuladd12, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 12), align 4426 store float %fmuladd13, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 13), align 4427 store float %fmuladd14, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 14), align 4428 store float %fmuladd15, ptr getelementptr inbounds ([16 x float], ptr @dst32, i32 0, i64 15), align 4429 ret void430}431 432attributes #0 = { nounwind }433