241 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-prefix=SSE3; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=slm -passes=slp-vectorizer -S | FileCheck %s --check-prefix=SLM4; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=corei7-avx -passes=slp-vectorizer -S | FileCheck %s --check-prefix=AVX5; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=core-avx2 -passes=slp-vectorizer -S | FileCheck %s --check-prefix=AVX26; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=knl -passes=slp-vectorizer -S | FileCheck %s --check-prefix=AVX5127; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=skx -passes=slp-vectorizer -S | FileCheck %s --check-prefix=AVX5128 9define <8 x float> @fadd_fsub_v8f32(<8 x float> %a, <8 x float> %b) {10; SSE-LABEL: @fadd_fsub_v8f32(11; SSE-NEXT: [[TMP2:%.*]] = shufflevector <8 x float> [[TMP1:%.*]], <8 x float> poison, <4 x i32> <i32 1, i32 2, i32 5, i32 6>12; SSE-NEXT: [[TMP9:%.*]] = shufflevector <8 x float> [[TMP3:%.*]], <8 x float> poison, <4 x i32> <i32 1, i32 2, i32 5, i32 6>13; SSE-NEXT: [[TMP10:%.*]] = fsub <4 x float> [[TMP2]], [[TMP9]]14; SSE-NEXT: [[TMP11:%.*]] = shufflevector <8 x float> [[TMP1]], <8 x float> poison, <4 x i32> <i32 0, i32 3, i32 4, i32 7>15; SSE-NEXT: [[TMP4:%.*]] = shufflevector <8 x float> [[TMP3]], <8 x float> poison, <4 x i32> <i32 0, i32 3, i32 4, i32 7>16; SSE-NEXT: [[TMP6:%.*]] = fadd <4 x float> [[TMP11]], [[TMP4]]17; SSE-NEXT: [[TMP7:%.*]] = shufflevector <4 x float> [[TMP6]], <4 x float> poison, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 poison, i32 poison, i32 poison, i32 poison>18; SSE-NEXT: [[TMP12:%.*]] = shufflevector <4 x float> [[TMP10]], <4 x float> poison, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 poison, i32 poison, i32 poison, i32 poison>19; SSE-NEXT: [[TMP8:%.*]] = shufflevector <8 x float> [[TMP7]], <8 x float> [[TMP12]], <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 8, i32 9, i32 10, i32 11>20; SSE-NEXT: [[TMP5:%.*]] = shufflevector <8 x float> [[TMP8]], <8 x float> poison, <8 x i32> <i32 0, i32 4, i32 5, i32 1, i32 2, i32 6, i32 7, i32 3>21; SSE-NEXT: ret <8 x float> [[TMP5]]22;23; SLM-LABEL: @fadd_fsub_v8f32(24; SLM-NEXT: [[TMP2:%.*]] = shufflevector <8 x float> [[TMP1:%.*]], <8 x float> poison, <4 x i32> <i32 1, i32 2, i32 5, i32 6>25; SLM-NEXT: [[TMP9:%.*]] = shufflevector <8 x float> [[TMP3:%.*]], <8 x float> poison, <4 x i32> <i32 1, i32 2, i32 5, i32 6>26; SLM-NEXT: [[TMP10:%.*]] = fsub <4 x float> [[TMP2]], [[TMP9]]27; SLM-NEXT: [[TMP11:%.*]] = shufflevector <8 x float> [[TMP1]], <8 x float> poison, <4 x i32> <i32 0, i32 3, i32 4, i32 7>28; SLM-NEXT: [[TMP4:%.*]] = shufflevector <8 x float> [[TMP3]], <8 x float> poison, <4 x i32> <i32 0, i32 3, i32 4, i32 7>29; SLM-NEXT: [[TMP6:%.*]] = fadd <4 x float> [[TMP11]], [[TMP4]]30; SLM-NEXT: [[TMP7:%.*]] = shufflevector <4 x float> [[TMP6]], <4 x float> poison, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 poison, i32 poison, i32 poison, i32 poison>31; SLM-NEXT: [[TMP12:%.*]] = shufflevector <4 x float> [[TMP10]], <4 x float> poison, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 poison, i32 poison, i32 poison, i32 poison>32; SLM-NEXT: [[TMP8:%.*]] = shufflevector <8 x float> [[TMP7]], <8 x float> [[TMP12]], <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 8, i32 9, i32 10, i32 11>33; SLM-NEXT: [[TMP5:%.*]] = shufflevector <8 x float> [[TMP8]], <8 x float> poison, <8 x i32> <i32 0, i32 4, i32 5, i32 1, i32 2, i32 6, i32 7, i32 3>34; SLM-NEXT: ret <8 x float> [[TMP5]]35;36; AVX-LABEL: @fadd_fsub_v8f32(37; AVX-NEXT: [[TMP2:%.*]] = shufflevector <8 x float> [[TMP1:%.*]], <8 x float> poison, <4 x i32> <i32 1, i32 2, i32 5, i32 6>38; AVX-NEXT: [[TMP9:%.*]] = shufflevector <8 x float> [[TMP3:%.*]], <8 x float> poison, <4 x i32> <i32 1, i32 2, i32 5, i32 6>39; AVX-NEXT: [[TMP10:%.*]] = fsub <4 x float> [[TMP2]], [[TMP9]]40; AVX-NEXT: [[TMP11:%.*]] = shufflevector <8 x float> [[TMP1]], <8 x float> poison, <4 x i32> <i32 0, i32 3, i32 4, i32 7>41; AVX-NEXT: [[TMP4:%.*]] = shufflevector <8 x float> [[TMP3]], <8 x float> poison, <4 x i32> <i32 0, i32 3, i32 4, i32 7>42; AVX-NEXT: [[TMP6:%.*]] = fadd <4 x float> [[TMP11]], [[TMP4]]43; AVX-NEXT: [[TMP7:%.*]] = shufflevector <4 x float> [[TMP6]], <4 x float> poison, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 poison, i32 poison, i32 poison, i32 poison>44; AVX-NEXT: [[TMP12:%.*]] = shufflevector <4 x float> [[TMP10]], <4 x float> poison, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 poison, i32 poison, i32 poison, i32 poison>45; AVX-NEXT: [[TMP8:%.*]] = shufflevector <8 x float> [[TMP7]], <8 x float> [[TMP12]], <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 8, i32 9, i32 10, i32 11>46; AVX-NEXT: [[TMP5:%.*]] = shufflevector <8 x float> [[TMP8]], <8 x float> poison, <8 x i32> <i32 0, i32 4, i32 5, i32 1, i32 2, i32 6, i32 7, i32 3>47; AVX-NEXT: ret <8 x float> [[TMP5]]48;49; AVX2-LABEL: @fadd_fsub_v8f32(50; AVX2-NEXT: [[TMP1:%.*]] = fadd <8 x float> [[A:%.*]], [[B:%.*]]51; AVX2-NEXT: [[TMP2:%.*]] = fsub <8 x float> [[A]], [[B]]52; AVX2-NEXT: [[TMP3:%.*]] = shufflevector <8 x float> [[TMP1]], <8 x float> [[TMP2]], <8 x i32> <i32 0, i32 9, i32 10, i32 3, i32 4, i32 13, i32 14, i32 7>53; AVX2-NEXT: ret <8 x float> [[TMP3]]54;55; AVX512-LABEL: @fadd_fsub_v8f32(56; AVX512-NEXT: [[TMP1:%.*]] = fadd <8 x float> [[A:%.*]], [[B:%.*]]57; AVX512-NEXT: [[TMP2:%.*]] = fsub <8 x float> [[A]], [[B]]58; AVX512-NEXT: [[TMP3:%.*]] = shufflevector <8 x float> [[TMP1]], <8 x float> [[TMP2]], <8 x i32> <i32 0, i32 9, i32 10, i32 3, i32 4, i32 13, i32 14, i32 7>59; AVX512-NEXT: ret <8 x float> [[TMP3]]60;61 %a0 = extractelement <8 x float> %a, i32 062 %a1 = extractelement <8 x float> %a, i32 163 %a2 = extractelement <8 x float> %a, i32 264 %a3 = extractelement <8 x float> %a, i32 365 %a4 = extractelement <8 x float> %a, i32 466 %a5 = extractelement <8 x float> %a, i32 567 %a6 = extractelement <8 x float> %a, i32 668 %a7 = extractelement <8 x float> %a, i32 769 %b0 = extractelement <8 x float> %b, i32 070 %b1 = extractelement <8 x float> %b, i32 171 %b2 = extractelement <8 x float> %b, i32 272 %b3 = extractelement <8 x float> %b, i32 373 %b4 = extractelement <8 x float> %b, i32 474 %b5 = extractelement <8 x float> %b, i32 575 %b6 = extractelement <8 x float> %b, i32 676 %b7 = extractelement <8 x float> %b, i32 777 %ab0 = fadd float %a0, %b078 %ab1 = fsub float %a1, %b179 %ab2 = fsub float %a2, %b280 %ab3 = fadd float %a3, %b381 %ab4 = fadd float %a4, %b482 %ab5 = fsub float %a5, %b583 %ab6 = fsub float %a6, %b684 %ab7 = fadd float %a7, %b785 %r0 = insertelement <8 x float> undef, float %ab0, i32 086 %r1 = insertelement <8 x float> %r0, float %ab1, i32 187 %r2 = insertelement <8 x float> %r1, float %ab2, i32 288 %r3 = insertelement <8 x float> %r2, float %ab3, i32 389 %r4 = insertelement <8 x float> %r3, float %ab4, i32 490 %r5 = insertelement <8 x float> %r4, float %ab5, i32 591 %r6 = insertelement <8 x float> %r5, float %ab6, i32 692 %r7 = insertelement <8 x float> %r6, float %ab7, i32 793 ret <8 x float> %r794}95 96define <8 x float> @fmul_fdiv_v8f32(<8 x float> %a, <8 x float> %b) {97; SSE-LABEL: @fmul_fdiv_v8f32(98; SSE-NEXT: [[TMP2:%.*]] = shufflevector <8 x float> [[TMP1:%.*]], <8 x float> poison, <4 x i32> <i32 1, i32 2, i32 5, i32 6>99; SSE-NEXT: [[TMP9:%.*]] = shufflevector <8 x float> [[TMP3:%.*]], <8 x float> poison, <4 x i32> <i32 1, i32 2, i32 5, i32 6>100; SSE-NEXT: [[TMP10:%.*]] = fdiv <4 x float> [[TMP2]], [[TMP9]]101; SSE-NEXT: [[TMP11:%.*]] = shufflevector <8 x float> [[TMP1]], <8 x float> poison, <4 x i32> <i32 0, i32 3, i32 4, i32 7>102; SSE-NEXT: [[TMP4:%.*]] = shufflevector <8 x float> [[TMP3]], <8 x float> poison, <4 x i32> <i32 0, i32 3, i32 4, i32 7>103; SSE-NEXT: [[TMP6:%.*]] = fmul <4 x float> [[TMP11]], [[TMP4]]104; SSE-NEXT: [[TMP7:%.*]] = shufflevector <4 x float> [[TMP6]], <4 x float> poison, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 poison, i32 poison, i32 poison, i32 poison>105; SSE-NEXT: [[TMP12:%.*]] = shufflevector <4 x float> [[TMP10]], <4 x float> poison, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 poison, i32 poison, i32 poison, i32 poison>106; SSE-NEXT: [[TMP8:%.*]] = shufflevector <8 x float> [[TMP7]], <8 x float> [[TMP12]], <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 8, i32 9, i32 10, i32 11>107; SSE-NEXT: [[TMP5:%.*]] = shufflevector <8 x float> [[TMP8]], <8 x float> poison, <8 x i32> <i32 0, i32 4, i32 5, i32 1, i32 2, i32 6, i32 7, i32 3>108; SSE-NEXT: ret <8 x float> [[TMP5]]109;110; SLM-LABEL: @fmul_fdiv_v8f32(111; SLM-NEXT: [[TMP2:%.*]] = shufflevector <8 x float> [[TMP1:%.*]], <8 x float> poison, <4 x i32> <i32 1, i32 2, i32 5, i32 6>112; SLM-NEXT: [[TMP9:%.*]] = shufflevector <8 x float> [[TMP3:%.*]], <8 x float> poison, <4 x i32> <i32 1, i32 2, i32 5, i32 6>113; SLM-NEXT: [[TMP10:%.*]] = fdiv <4 x float> [[TMP2]], [[TMP9]]114; SLM-NEXT: [[TMP11:%.*]] = shufflevector <8 x float> [[TMP1]], <8 x float> poison, <4 x i32> <i32 0, i32 3, i32 4, i32 7>115; SLM-NEXT: [[TMP4:%.*]] = shufflevector <8 x float> [[TMP3]], <8 x float> poison, <4 x i32> <i32 0, i32 3, i32 4, i32 7>116; SLM-NEXT: [[TMP6:%.*]] = fmul <4 x float> [[TMP11]], [[TMP4]]117; SLM-NEXT: [[TMP7:%.*]] = shufflevector <4 x float> [[TMP6]], <4 x float> poison, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 poison, i32 poison, i32 poison, i32 poison>118; SLM-NEXT: [[TMP12:%.*]] = shufflevector <4 x float> [[TMP10]], <4 x float> poison, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 poison, i32 poison, i32 poison, i32 poison>119; SLM-NEXT: [[TMP8:%.*]] = shufflevector <8 x float> [[TMP7]], <8 x float> [[TMP12]], <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 8, i32 9, i32 10, i32 11>120; SLM-NEXT: [[TMP5:%.*]] = shufflevector <8 x float> [[TMP8]], <8 x float> poison, <8 x i32> <i32 0, i32 4, i32 5, i32 1, i32 2, i32 6, i32 7, i32 3>121; SLM-NEXT: ret <8 x float> [[TMP5]]122;123; AVX-LABEL: @fmul_fdiv_v8f32(124; AVX-NEXT: [[TMP2:%.*]] = shufflevector <8 x float> [[TMP1:%.*]], <8 x float> poison, <4 x i32> <i32 1, i32 2, i32 5, i32 6>125; AVX-NEXT: [[TMP9:%.*]] = shufflevector <8 x float> [[TMP3:%.*]], <8 x float> poison, <4 x i32> <i32 1, i32 2, i32 5, i32 6>126; AVX-NEXT: [[TMP10:%.*]] = fdiv <4 x float> [[TMP2]], [[TMP9]]127; AVX-NEXT: [[TMP11:%.*]] = shufflevector <8 x float> [[TMP1]], <8 x float> poison, <4 x i32> <i32 0, i32 3, i32 4, i32 7>128; AVX-NEXT: [[TMP4:%.*]] = shufflevector <8 x float> [[TMP3]], <8 x float> poison, <4 x i32> <i32 0, i32 3, i32 4, i32 7>129; AVX-NEXT: [[TMP6:%.*]] = fmul <4 x float> [[TMP11]], [[TMP4]]130; AVX-NEXT: [[TMP7:%.*]] = shufflevector <4 x float> [[TMP6]], <4 x float> poison, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 poison, i32 poison, i32 poison, i32 poison>131; AVX-NEXT: [[TMP12:%.*]] = shufflevector <4 x float> [[TMP10]], <4 x float> poison, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 poison, i32 poison, i32 poison, i32 poison>132; AVX-NEXT: [[TMP8:%.*]] = shufflevector <8 x float> [[TMP7]], <8 x float> [[TMP12]], <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 8, i32 9, i32 10, i32 11>133; AVX-NEXT: [[TMP5:%.*]] = shufflevector <8 x float> [[TMP8]], <8 x float> poison, <8 x i32> <i32 0, i32 4, i32 5, i32 1, i32 2, i32 6, i32 7, i32 3>134; AVX-NEXT: ret <8 x float> [[TMP5]]135;136; AVX2-LABEL: @fmul_fdiv_v8f32(137; AVX2-NEXT: [[TMP2:%.*]] = shufflevector <8 x float> [[TMP1:%.*]], <8 x float> poison, <4 x i32> <i32 1, i32 2, i32 5, i32 6>138; AVX2-NEXT: [[TMP9:%.*]] = shufflevector <8 x float> [[TMP3:%.*]], <8 x float> poison, <4 x i32> <i32 1, i32 2, i32 5, i32 6>139; AVX2-NEXT: [[TMP10:%.*]] = fdiv <4 x float> [[TMP2]], [[TMP9]]140; AVX2-NEXT: [[TMP11:%.*]] = shufflevector <8 x float> [[TMP1]], <8 x float> poison, <4 x i32> <i32 0, i32 3, i32 4, i32 7>141; AVX2-NEXT: [[TMP4:%.*]] = shufflevector <8 x float> [[TMP3]], <8 x float> poison, <4 x i32> <i32 0, i32 3, i32 4, i32 7>142; AVX2-NEXT: [[TMP6:%.*]] = fmul <4 x float> [[TMP11]], [[TMP4]]143; AVX2-NEXT: [[TMP7:%.*]] = shufflevector <4 x float> [[TMP6]], <4 x float> poison, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 poison, i32 poison, i32 poison, i32 poison>144; AVX2-NEXT: [[TMP12:%.*]] = shufflevector <4 x float> [[TMP10]], <4 x float> poison, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 poison, i32 poison, i32 poison, i32 poison>145; AVX2-NEXT: [[TMP8:%.*]] = shufflevector <8 x float> [[TMP7]], <8 x float> [[TMP12]], <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 8, i32 9, i32 10, i32 11>146; AVX2-NEXT: [[TMP5:%.*]] = shufflevector <8 x float> [[TMP8]], <8 x float> poison, <8 x i32> <i32 0, i32 4, i32 5, i32 1, i32 2, i32 6, i32 7, i32 3>147; AVX2-NEXT: ret <8 x float> [[TMP5]]148;149; AVX512-LABEL: @fmul_fdiv_v8f32(150; AVX512-NEXT: [[TMP1:%.*]] = fmul <8 x float> [[A:%.*]], [[B:%.*]]151; AVX512-NEXT: [[TMP2:%.*]] = fdiv <8 x float> [[A]], [[B]]152; AVX512-NEXT: [[TMP3:%.*]] = shufflevector <8 x float> [[TMP1]], <8 x float> [[TMP2]], <8 x i32> <i32 0, i32 9, i32 10, i32 3, i32 4, i32 13, i32 14, i32 7>153; AVX512-NEXT: ret <8 x float> [[TMP3]]154;155 %a0 = extractelement <8 x float> %a, i32 0156 %a1 = extractelement <8 x float> %a, i32 1157 %a2 = extractelement <8 x float> %a, i32 2158 %a3 = extractelement <8 x float> %a, i32 3159 %a4 = extractelement <8 x float> %a, i32 4160 %a5 = extractelement <8 x float> %a, i32 5161 %a6 = extractelement <8 x float> %a, i32 6162 %a7 = extractelement <8 x float> %a, i32 7163 %b0 = extractelement <8 x float> %b, i32 0164 %b1 = extractelement <8 x float> %b, i32 1165 %b2 = extractelement <8 x float> %b, i32 2166 %b3 = extractelement <8 x float> %b, i32 3167 %b4 = extractelement <8 x float> %b, i32 4168 %b5 = extractelement <8 x float> %b, i32 5169 %b6 = extractelement <8 x float> %b, i32 6170 %b7 = extractelement <8 x float> %b, i32 7171 %ab0 = fmul float %a0, %b0172 %ab1 = fdiv float %a1, %b1173 %ab2 = fdiv float %a2, %b2174 %ab3 = fmul float %a3, %b3175 %ab4 = fmul float %a4, %b4176 %ab5 = fdiv float %a5, %b5177 %ab6 = fdiv float %a6, %b6178 %ab7 = fmul float %a7, %b7179 %r0 = insertelement <8 x float> undef, float %ab0, i32 0180 %r1 = insertelement <8 x float> %r0, float %ab1, i32 1181 %r2 = insertelement <8 x float> %r1, float %ab2, i32 2182 %r3 = insertelement <8 x float> %r2, float %ab3, i32 3183 %r4 = insertelement <8 x float> %r3, float %ab4, i32 4184 %r5 = insertelement <8 x float> %r4, float %ab5, i32 5185 %r6 = insertelement <8 x float> %r5, float %ab6, i32 6186 %r7 = insertelement <8 x float> %r6, float %ab7, i32 7187 ret <8 x float> %r7188}189 190define <4 x float> @fmul_fdiv_v4f32_const(<4 x float> %a) {191; SSE-LABEL: @fmul_fdiv_v4f32_const(192; SSE-NEXT: [[TMP3:%.*]] = fmul <4 x float> [[A:%.*]], <float 2.000000e+00, float 1.000000e+00, float 1.000000e+00, float 5.000000e-01>193; SSE-NEXT: [[TMP2:%.*]] = fdiv <4 x float> [[A]], <float 2.000000e+00, float 1.000000e+00, float 1.000000e+00, float 5.000000e-01>194; SSE-NEXT: [[TMP1:%.*]] = shufflevector <4 x float> [[TMP3]], <4 x float> [[TMP2]], <4 x i32> <i32 0, i32 1, i32 6, i32 7>195; SSE-NEXT: ret <4 x float> [[TMP1]]196;197; SLM-LABEL: @fmul_fdiv_v4f32_const(198; SLM-NEXT: [[A2:%.*]] = extractelement <4 x float> [[A:%.*]], i32 2199; SLM-NEXT: [[A3:%.*]] = extractelement <4 x float> [[A]], i32 3200; SLM-NEXT: [[TMP1:%.*]] = shufflevector <4 x float> [[A]], <4 x float> poison, <2 x i32> <i32 0, i32 1>201; SLM-NEXT: [[TMP2:%.*]] = fmul <2 x float> [[TMP1]], <float 2.000000e+00, float 1.000000e+00>202; SLM-NEXT: [[AB2:%.*]] = fdiv float [[A2]], 1.000000e+00203; SLM-NEXT: [[AB3:%.*]] = fdiv float [[A3]], 5.000000e-01204; SLM-NEXT: [[TMP3:%.*]] = shufflevector <2 x float> [[TMP2]], <2 x float> poison, <4 x i32> <i32 0, i32 1, i32 poison, i32 poison>205; SLM-NEXT: [[R2:%.*]] = insertelement <4 x float> [[TMP3]], float [[AB2]], i32 2206; SLM-NEXT: [[R3:%.*]] = insertelement <4 x float> [[R2]], float [[AB3]], i32 3207; SLM-NEXT: ret <4 x float> [[R3]]208;209; AVX-LABEL: @fmul_fdiv_v4f32_const(210; AVX-NEXT: [[TMP3:%.*]] = fmul <4 x float> [[A:%.*]], <float 2.000000e+00, float 1.000000e+00, float 1.000000e+00, float 5.000000e-01>211; AVX-NEXT: [[TMP2:%.*]] = fdiv <4 x float> [[A]], <float 2.000000e+00, float 1.000000e+00, float 1.000000e+00, float 5.000000e-01>212; AVX-NEXT: [[TMP1:%.*]] = shufflevector <4 x float> [[TMP3]], <4 x float> [[TMP2]], <4 x i32> <i32 0, i32 1, i32 6, i32 7>213; AVX-NEXT: ret <4 x float> [[TMP1]]214;215; AVX2-LABEL: @fmul_fdiv_v4f32_const(216; AVX2-NEXT: [[TMP3:%.*]] = fmul <4 x float> [[A:%.*]], <float 2.000000e+00, float 1.000000e+00, float 1.000000e+00, float 5.000000e-01>217; AVX2-NEXT: [[TMP2:%.*]] = fdiv <4 x float> [[A]], <float 2.000000e+00, float 1.000000e+00, float 1.000000e+00, float 5.000000e-01>218; AVX2-NEXT: [[TMP1:%.*]] = shufflevector <4 x float> [[TMP3]], <4 x float> [[TMP2]], <4 x i32> <i32 0, i32 1, i32 6, i32 7>219; AVX2-NEXT: ret <4 x float> [[TMP1]]220;221; AVX512-LABEL: @fmul_fdiv_v4f32_const(222; AVX512-NEXT: [[TMP3:%.*]] = fmul <4 x float> [[A:%.*]], <float 2.000000e+00, float 1.000000e+00, float 1.000000e+00, float 5.000000e-01>223; AVX512-NEXT: [[TMP2:%.*]] = fdiv <4 x float> [[A]], <float 2.000000e+00, float 1.000000e+00, float 1.000000e+00, float 5.000000e-01>224; AVX512-NEXT: [[TMP1:%.*]] = shufflevector <4 x float> [[TMP3]], <4 x float> [[TMP2]], <4 x i32> <i32 0, i32 1, i32 6, i32 7>225; AVX512-NEXT: ret <4 x float> [[TMP1]]226;227 %a0 = extractelement <4 x float> %a, i32 0228 %a1 = extractelement <4 x float> %a, i32 1229 %a2 = extractelement <4 x float> %a, i32 2230 %a3 = extractelement <4 x float> %a, i32 3231 %ab0 = fmul float %a0, 2.0232 %ab1 = fmul float %a1, 1.0233 %ab2 = fdiv float %a2, 1.0234 %ab3 = fdiv float %a3, 0.5235 %r0 = insertelement <4 x float> undef, float %ab0, i32 0236 %r1 = insertelement <4 x float> %r0, float %ab1, i32 1237 %r2 = insertelement <4 x float> %r1, float %ab2, i32 2238 %r3 = insertelement <4 x float> %r2, float %ab3, i32 3239 ret <4 x float> %r3240}241