1*9880d681SAndroid Build Coastguard Worker; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 2*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple=i686-apple-darwin -mattr=+avx2 | FileCheck %s --check-prefix=CHECK --check-prefix=X32 3*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=+avx2 | FileCheck %s --check-prefix=CHECK --check-prefix=X64 4*9880d681SAndroid Build Coastguard Worker 5*9880d681SAndroid Build Coastguard Workerdefine <16 x i8> @BB16(i8* %ptr) nounwind uwtable readnone ssp { 6*9880d681SAndroid Build Coastguard Worker; X32-LABEL: BB16: 7*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: ## %entry 8*9880d681SAndroid Build Coastguard Worker; X32-NEXT: movl {{[0-9]+}}(%esp), %eax 9*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vpbroadcastb (%eax), %xmm0 10*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 11*9880d681SAndroid Build Coastguard Worker; 12*9880d681SAndroid Build Coastguard Worker; X64-LABEL: BB16: 13*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: ## %entry 14*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vpbroadcastb (%rdi), %xmm0 15*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 16*9880d681SAndroid Build Coastguard Workerentry: 17*9880d681SAndroid Build Coastguard Worker %q = load i8, i8* %ptr, align 4 18*9880d681SAndroid Build Coastguard Worker %q0 = insertelement <16 x i8> undef, i8 %q, i32 0 19*9880d681SAndroid Build Coastguard Worker %q1 = insertelement <16 x i8> %q0, i8 %q, i32 1 20*9880d681SAndroid Build Coastguard Worker %q2 = insertelement <16 x i8> %q1, i8 %q, i32 2 21*9880d681SAndroid Build Coastguard Worker %q3 = insertelement <16 x i8> %q2, i8 %q, i32 3 22*9880d681SAndroid Build Coastguard Worker %q4 = insertelement <16 x i8> %q3, i8 %q, i32 4 23*9880d681SAndroid Build Coastguard Worker %q5 = insertelement <16 x i8> %q4, i8 %q, i32 5 24*9880d681SAndroid Build Coastguard Worker %q6 = insertelement <16 x i8> %q5, i8 %q, i32 6 25*9880d681SAndroid Build Coastguard Worker %q7 = insertelement <16 x i8> %q6, i8 %q, i32 7 26*9880d681SAndroid Build Coastguard Worker %q8 = insertelement <16 x i8> %q7, i8 %q, i32 8 27*9880d681SAndroid Build Coastguard Worker %q9 = insertelement <16 x i8> %q8, i8 %q, i32 9 28*9880d681SAndroid Build Coastguard Worker %qa = insertelement <16 x i8> %q9, i8 %q, i32 10 29*9880d681SAndroid Build Coastguard Worker %qb = insertelement <16 x i8> %qa, i8 %q, i32 11 30*9880d681SAndroid Build Coastguard Worker %qc = insertelement <16 x i8> %qb, i8 %q, i32 12 31*9880d681SAndroid Build Coastguard Worker %qd = insertelement <16 x i8> %qc, i8 %q, i32 13 32*9880d681SAndroid Build Coastguard Worker %qe = insertelement <16 x i8> %qd, i8 %q, i32 14 33*9880d681SAndroid Build Coastguard Worker %qf = insertelement <16 x i8> %qe, i8 %q, i32 15 34*9880d681SAndroid Build Coastguard Worker ret <16 x i8> %qf 35*9880d681SAndroid Build Coastguard Worker} 36*9880d681SAndroid Build Coastguard Worker 37*9880d681SAndroid Build Coastguard Workerdefine <32 x i8> @BB32(i8* %ptr) nounwind uwtable readnone ssp { 38*9880d681SAndroid Build Coastguard Worker; X32-LABEL: BB32: 39*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: ## %entry 40*9880d681SAndroid Build Coastguard Worker; X32-NEXT: movl {{[0-9]+}}(%esp), %eax 41*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vpbroadcastb (%eax), %ymm0 42*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 43*9880d681SAndroid Build Coastguard Worker; 44*9880d681SAndroid Build Coastguard Worker; X64-LABEL: BB32: 45*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: ## %entry 46*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vpbroadcastb (%rdi), %ymm0 47*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 48*9880d681SAndroid Build Coastguard Workerentry: 49*9880d681SAndroid Build Coastguard Worker %q = load i8, i8* %ptr, align 4 50*9880d681SAndroid Build Coastguard Worker %q0 = insertelement <32 x i8> undef, i8 %q, i32 0 51*9880d681SAndroid Build Coastguard Worker %q1 = insertelement <32 x i8> %q0, i8 %q, i32 1 52*9880d681SAndroid Build Coastguard Worker %q2 = insertelement <32 x i8> %q1, i8 %q, i32 2 53*9880d681SAndroid Build Coastguard Worker %q3 = insertelement <32 x i8> %q2, i8 %q, i32 3 54*9880d681SAndroid Build Coastguard Worker %q4 = insertelement <32 x i8> %q3, i8 %q, i32 4 55*9880d681SAndroid Build Coastguard Worker %q5 = insertelement <32 x i8> %q4, i8 %q, i32 5 56*9880d681SAndroid Build Coastguard Worker %q6 = insertelement <32 x i8> %q5, i8 %q, i32 6 57*9880d681SAndroid Build Coastguard Worker %q7 = insertelement <32 x i8> %q6, i8 %q, i32 7 58*9880d681SAndroid Build Coastguard Worker %q8 = insertelement <32 x i8> %q7, i8 %q, i32 8 59*9880d681SAndroid Build Coastguard Worker %q9 = insertelement <32 x i8> %q8, i8 %q, i32 9 60*9880d681SAndroid Build Coastguard Worker %qa = insertelement <32 x i8> %q9, i8 %q, i32 10 61*9880d681SAndroid Build Coastguard Worker %qb = insertelement <32 x i8> %qa, i8 %q, i32 11 62*9880d681SAndroid Build Coastguard Worker %qc = insertelement <32 x i8> %qb, i8 %q, i32 12 63*9880d681SAndroid Build Coastguard Worker %qd = insertelement <32 x i8> %qc, i8 %q, i32 13 64*9880d681SAndroid Build Coastguard Worker %qe = insertelement <32 x i8> %qd, i8 %q, i32 14 65*9880d681SAndroid Build Coastguard Worker %qf = insertelement <32 x i8> %qe, i8 %q, i32 15 66*9880d681SAndroid Build Coastguard Worker 67*9880d681SAndroid Build Coastguard Worker %q20 = insertelement <32 x i8> %qf, i8 %q, i32 16 68*9880d681SAndroid Build Coastguard Worker %q21 = insertelement <32 x i8> %q20, i8 %q, i32 17 69*9880d681SAndroid Build Coastguard Worker %q22 = insertelement <32 x i8> %q21, i8 %q, i32 18 70*9880d681SAndroid Build Coastguard Worker %q23 = insertelement <32 x i8> %q22, i8 %q, i32 19 71*9880d681SAndroid Build Coastguard Worker %q24 = insertelement <32 x i8> %q23, i8 %q, i32 20 72*9880d681SAndroid Build Coastguard Worker %q25 = insertelement <32 x i8> %q24, i8 %q, i32 21 73*9880d681SAndroid Build Coastguard Worker %q26 = insertelement <32 x i8> %q25, i8 %q, i32 22 74*9880d681SAndroid Build Coastguard Worker %q27 = insertelement <32 x i8> %q26, i8 %q, i32 23 75*9880d681SAndroid Build Coastguard Worker %q28 = insertelement <32 x i8> %q27, i8 %q, i32 24 76*9880d681SAndroid Build Coastguard Worker %q29 = insertelement <32 x i8> %q28, i8 %q, i32 25 77*9880d681SAndroid Build Coastguard Worker %q2a = insertelement <32 x i8> %q29, i8 %q, i32 26 78*9880d681SAndroid Build Coastguard Worker %q2b = insertelement <32 x i8> %q2a, i8 %q, i32 27 79*9880d681SAndroid Build Coastguard Worker %q2c = insertelement <32 x i8> %q2b, i8 %q, i32 28 80*9880d681SAndroid Build Coastguard Worker %q2d = insertelement <32 x i8> %q2c, i8 %q, i32 29 81*9880d681SAndroid Build Coastguard Worker %q2e = insertelement <32 x i8> %q2d, i8 %q, i32 30 82*9880d681SAndroid Build Coastguard Worker %q2f = insertelement <32 x i8> %q2e, i8 %q, i32 31 83*9880d681SAndroid Build Coastguard Worker ret <32 x i8> %q2f 84*9880d681SAndroid Build Coastguard Worker} 85*9880d681SAndroid Build Coastguard Worker 86*9880d681SAndroid Build Coastguard Workerdefine <8 x i16> @W16(i16* %ptr) nounwind uwtable readnone ssp { 87*9880d681SAndroid Build Coastguard Worker; X32-LABEL: W16: 88*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: ## %entry 89*9880d681SAndroid Build Coastguard Worker; X32-NEXT: movl {{[0-9]+}}(%esp), %eax 90*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vpbroadcastw (%eax), %xmm0 91*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 92*9880d681SAndroid Build Coastguard Worker; 93*9880d681SAndroid Build Coastguard Worker; X64-LABEL: W16: 94*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: ## %entry 95*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vpbroadcastw (%rdi), %xmm0 96*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 97*9880d681SAndroid Build Coastguard Workerentry: 98*9880d681SAndroid Build Coastguard Worker %q = load i16, i16* %ptr, align 4 99*9880d681SAndroid Build Coastguard Worker %q0 = insertelement <8 x i16> undef, i16 %q, i32 0 100*9880d681SAndroid Build Coastguard Worker %q1 = insertelement <8 x i16> %q0, i16 %q, i32 1 101*9880d681SAndroid Build Coastguard Worker %q2 = insertelement <8 x i16> %q1, i16 %q, i32 2 102*9880d681SAndroid Build Coastguard Worker %q3 = insertelement <8 x i16> %q2, i16 %q, i32 3 103*9880d681SAndroid Build Coastguard Worker %q4 = insertelement <8 x i16> %q3, i16 %q, i32 4 104*9880d681SAndroid Build Coastguard Worker %q5 = insertelement <8 x i16> %q4, i16 %q, i32 5 105*9880d681SAndroid Build Coastguard Worker %q6 = insertelement <8 x i16> %q5, i16 %q, i32 6 106*9880d681SAndroid Build Coastguard Worker %q7 = insertelement <8 x i16> %q6, i16 %q, i32 7 107*9880d681SAndroid Build Coastguard Worker ret <8 x i16> %q7 108*9880d681SAndroid Build Coastguard Worker} 109*9880d681SAndroid Build Coastguard Worker 110*9880d681SAndroid Build Coastguard Workerdefine <16 x i16> @WW16(i16* %ptr) nounwind uwtable readnone ssp { 111*9880d681SAndroid Build Coastguard Worker; X32-LABEL: WW16: 112*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: ## %entry 113*9880d681SAndroid Build Coastguard Worker; X32-NEXT: movl {{[0-9]+}}(%esp), %eax 114*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vpbroadcastw (%eax), %ymm0 115*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 116*9880d681SAndroid Build Coastguard Worker; 117*9880d681SAndroid Build Coastguard Worker; X64-LABEL: WW16: 118*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: ## %entry 119*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vpbroadcastw (%rdi), %ymm0 120*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 121*9880d681SAndroid Build Coastguard Workerentry: 122*9880d681SAndroid Build Coastguard Worker %q = load i16, i16* %ptr, align 4 123*9880d681SAndroid Build Coastguard Worker %q0 = insertelement <16 x i16> undef, i16 %q, i32 0 124*9880d681SAndroid Build Coastguard Worker %q1 = insertelement <16 x i16> %q0, i16 %q, i32 1 125*9880d681SAndroid Build Coastguard Worker %q2 = insertelement <16 x i16> %q1, i16 %q, i32 2 126*9880d681SAndroid Build Coastguard Worker %q3 = insertelement <16 x i16> %q2, i16 %q, i32 3 127*9880d681SAndroid Build Coastguard Worker %q4 = insertelement <16 x i16> %q3, i16 %q, i32 4 128*9880d681SAndroid Build Coastguard Worker %q5 = insertelement <16 x i16> %q4, i16 %q, i32 5 129*9880d681SAndroid Build Coastguard Worker %q6 = insertelement <16 x i16> %q5, i16 %q, i32 6 130*9880d681SAndroid Build Coastguard Worker %q7 = insertelement <16 x i16> %q6, i16 %q, i32 7 131*9880d681SAndroid Build Coastguard Worker %q8 = insertelement <16 x i16> %q7, i16 %q, i32 8 132*9880d681SAndroid Build Coastguard Worker %q9 = insertelement <16 x i16> %q8, i16 %q, i32 9 133*9880d681SAndroid Build Coastguard Worker %qa = insertelement <16 x i16> %q9, i16 %q, i32 10 134*9880d681SAndroid Build Coastguard Worker %qb = insertelement <16 x i16> %qa, i16 %q, i32 11 135*9880d681SAndroid Build Coastguard Worker %qc = insertelement <16 x i16> %qb, i16 %q, i32 12 136*9880d681SAndroid Build Coastguard Worker %qd = insertelement <16 x i16> %qc, i16 %q, i32 13 137*9880d681SAndroid Build Coastguard Worker %qe = insertelement <16 x i16> %qd, i16 %q, i32 14 138*9880d681SAndroid Build Coastguard Worker %qf = insertelement <16 x i16> %qe, i16 %q, i32 15 139*9880d681SAndroid Build Coastguard Worker ret <16 x i16> %qf 140*9880d681SAndroid Build Coastguard Worker} 141*9880d681SAndroid Build Coastguard Worker 142*9880d681SAndroid Build Coastguard Workerdefine <4 x i32> @D32(i32* %ptr) nounwind uwtable readnone ssp { 143*9880d681SAndroid Build Coastguard Worker; X32-LABEL: D32: 144*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: ## %entry 145*9880d681SAndroid Build Coastguard Worker; X32-NEXT: movl {{[0-9]+}}(%esp), %eax 146*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vbroadcastss (%eax), %xmm0 147*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 148*9880d681SAndroid Build Coastguard Worker; 149*9880d681SAndroid Build Coastguard Worker; X64-LABEL: D32: 150*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: ## %entry 151*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vbroadcastss (%rdi), %xmm0 152*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 153*9880d681SAndroid Build Coastguard Workerentry: 154*9880d681SAndroid Build Coastguard Worker %q = load i32, i32* %ptr, align 4 155*9880d681SAndroid Build Coastguard Worker %q0 = insertelement <4 x i32> undef, i32 %q, i32 0 156*9880d681SAndroid Build Coastguard Worker %q1 = insertelement <4 x i32> %q0, i32 %q, i32 1 157*9880d681SAndroid Build Coastguard Worker %q2 = insertelement <4 x i32> %q1, i32 %q, i32 2 158*9880d681SAndroid Build Coastguard Worker %q3 = insertelement <4 x i32> %q2, i32 %q, i32 3 159*9880d681SAndroid Build Coastguard Worker ret <4 x i32> %q3 160*9880d681SAndroid Build Coastguard Worker} 161*9880d681SAndroid Build Coastguard Worker 162*9880d681SAndroid Build Coastguard Workerdefine <8 x i32> @DD32(i32* %ptr) nounwind uwtable readnone ssp { 163*9880d681SAndroid Build Coastguard Worker; X32-LABEL: DD32: 164*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: ## %entry 165*9880d681SAndroid Build Coastguard Worker; X32-NEXT: movl {{[0-9]+}}(%esp), %eax 166*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vbroadcastss (%eax), %ymm0 167*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 168*9880d681SAndroid Build Coastguard Worker; 169*9880d681SAndroid Build Coastguard Worker; X64-LABEL: DD32: 170*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: ## %entry 171*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vbroadcastss (%rdi), %ymm0 172*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 173*9880d681SAndroid Build Coastguard Workerentry: 174*9880d681SAndroid Build Coastguard Worker %q = load i32, i32* %ptr, align 4 175*9880d681SAndroid Build Coastguard Worker %q0 = insertelement <8 x i32> undef, i32 %q, i32 0 176*9880d681SAndroid Build Coastguard Worker %q1 = insertelement <8 x i32> %q0, i32 %q, i32 1 177*9880d681SAndroid Build Coastguard Worker %q2 = insertelement <8 x i32> %q1, i32 %q, i32 2 178*9880d681SAndroid Build Coastguard Worker %q3 = insertelement <8 x i32> %q2, i32 %q, i32 3 179*9880d681SAndroid Build Coastguard Worker %q4 = insertelement <8 x i32> %q3, i32 %q, i32 4 180*9880d681SAndroid Build Coastguard Worker %q5 = insertelement <8 x i32> %q4, i32 %q, i32 5 181*9880d681SAndroid Build Coastguard Worker %q6 = insertelement <8 x i32> %q5, i32 %q, i32 6 182*9880d681SAndroid Build Coastguard Worker %q7 = insertelement <8 x i32> %q6, i32 %q, i32 7 183*9880d681SAndroid Build Coastguard Worker ret <8 x i32> %q7 184*9880d681SAndroid Build Coastguard Worker} 185*9880d681SAndroid Build Coastguard Worker 186*9880d681SAndroid Build Coastguard Workerdefine <2 x i64> @Q64(i64* %ptr) nounwind uwtable readnone ssp { 187*9880d681SAndroid Build Coastguard Worker; X32-LABEL: Q64: 188*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: ## %entry 189*9880d681SAndroid Build Coastguard Worker; X32-NEXT: movl {{[0-9]+}}(%esp), %eax 190*9880d681SAndroid Build Coastguard Worker; X32-NEXT: movl (%eax), %ecx 191*9880d681SAndroid Build Coastguard Worker; X32-NEXT: movl 4(%eax), %eax 192*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vmovd %ecx, %xmm0 193*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vpinsrd $1, %eax, %xmm0, %xmm0 194*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vpinsrd $2, %ecx, %xmm0, %xmm0 195*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vpinsrd $3, %eax, %xmm0, %xmm0 196*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 197*9880d681SAndroid Build Coastguard Worker; 198*9880d681SAndroid Build Coastguard Worker; X64-LABEL: Q64: 199*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: ## %entry 200*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vpbroadcastq (%rdi), %xmm0 201*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 202*9880d681SAndroid Build Coastguard Workerentry: 203*9880d681SAndroid Build Coastguard Worker %q = load i64, i64* %ptr, align 4 204*9880d681SAndroid Build Coastguard Worker %q0 = insertelement <2 x i64> undef, i64 %q, i32 0 205*9880d681SAndroid Build Coastguard Worker %q1 = insertelement <2 x i64> %q0, i64 %q, i32 1 206*9880d681SAndroid Build Coastguard Worker ret <2 x i64> %q1 207*9880d681SAndroid Build Coastguard Worker} 208*9880d681SAndroid Build Coastguard Worker 209*9880d681SAndroid Build Coastguard Workerdefine <4 x i64> @QQ64(i64* %ptr) nounwind uwtable readnone ssp { 210*9880d681SAndroid Build Coastguard Worker; X32-LABEL: QQ64: 211*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: ## %entry 212*9880d681SAndroid Build Coastguard Worker; X32-NEXT: movl {{[0-9]+}}(%esp), %eax 213*9880d681SAndroid Build Coastguard Worker; X32-NEXT: movl (%eax), %ecx 214*9880d681SAndroid Build Coastguard Worker; X32-NEXT: movl 4(%eax), %eax 215*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vmovd %ecx, %xmm0 216*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vpinsrd $1, %eax, %xmm0, %xmm0 217*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vpinsrd $2, %ecx, %xmm0, %xmm0 218*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vpinsrd $3, %eax, %xmm0, %xmm0 219*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0 220*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 221*9880d681SAndroid Build Coastguard Worker; 222*9880d681SAndroid Build Coastguard Worker; X64-LABEL: QQ64: 223*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: ## %entry 224*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vbroadcastsd (%rdi), %ymm0 225*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 226*9880d681SAndroid Build Coastguard Workerentry: 227*9880d681SAndroid Build Coastguard Worker %q = load i64, i64* %ptr, align 4 228*9880d681SAndroid Build Coastguard Worker %q0 = insertelement <4 x i64> undef, i64 %q, i32 0 229*9880d681SAndroid Build Coastguard Worker %q1 = insertelement <4 x i64> %q0, i64 %q, i32 1 230*9880d681SAndroid Build Coastguard Worker %q2 = insertelement <4 x i64> %q1, i64 %q, i32 2 231*9880d681SAndroid Build Coastguard Worker %q3 = insertelement <4 x i64> %q2, i64 %q, i32 3 232*9880d681SAndroid Build Coastguard Worker ret <4 x i64> %q3 233*9880d681SAndroid Build Coastguard Worker} 234*9880d681SAndroid Build Coastguard Worker 235*9880d681SAndroid Build Coastguard Worker; FIXME: Pointer adjusted broadcasts 236*9880d681SAndroid Build Coastguard Worker 237*9880d681SAndroid Build Coastguard Workerdefine <16 x i8> @load_splat_16i8_16i8_1111111111111111(<16 x i8>* %ptr) nounwind uwtable readnone ssp { 238*9880d681SAndroid Build Coastguard Worker; X32-LABEL: load_splat_16i8_16i8_1111111111111111: 239*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: ## %entry 240*9880d681SAndroid Build Coastguard Worker; X32-NEXT: movl {{[0-9]+}}(%esp), %eax 241*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vpbroadcastb 1(%eax), %xmm0 242*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 243*9880d681SAndroid Build Coastguard Worker; 244*9880d681SAndroid Build Coastguard Worker; X64-LABEL: load_splat_16i8_16i8_1111111111111111: 245*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: ## %entry 246*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vpbroadcastb 1(%rdi), %xmm0 247*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 248*9880d681SAndroid Build Coastguard Workerentry: 249*9880d681SAndroid Build Coastguard Worker %ld = load <16 x i8>, <16 x i8>* %ptr 250*9880d681SAndroid Build Coastguard Worker %ret = shufflevector <16 x i8> %ld, <16 x i8> undef, <16 x i32> <i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1> 251*9880d681SAndroid Build Coastguard Worker ret <16 x i8> %ret 252*9880d681SAndroid Build Coastguard Worker} 253*9880d681SAndroid Build Coastguard Worker 254*9880d681SAndroid Build Coastguard Workerdefine <32 x i8> @load_splat_32i8_16i8_11111111111111111111111111111111(<16 x i8>* %ptr) nounwind uwtable readnone ssp { 255*9880d681SAndroid Build Coastguard Worker; X32-LABEL: load_splat_32i8_16i8_11111111111111111111111111111111: 256*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: ## %entry 257*9880d681SAndroid Build Coastguard Worker; X32-NEXT: movl {{[0-9]+}}(%esp), %eax 258*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vpbroadcastb 1(%eax), %ymm0 259*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 260*9880d681SAndroid Build Coastguard Worker; 261*9880d681SAndroid Build Coastguard Worker; X64-LABEL: load_splat_32i8_16i8_11111111111111111111111111111111: 262*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: ## %entry 263*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vpbroadcastb 1(%rdi), %ymm0 264*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 265*9880d681SAndroid Build Coastguard Workerentry: 266*9880d681SAndroid Build Coastguard Worker %ld = load <16 x i8>, <16 x i8>* %ptr 267*9880d681SAndroid Build Coastguard Worker %ret = shufflevector <16 x i8> %ld, <16 x i8> undef, <32 x i32> <i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1> 268*9880d681SAndroid Build Coastguard Worker ret <32 x i8> %ret 269*9880d681SAndroid Build Coastguard Worker} 270*9880d681SAndroid Build Coastguard Worker 271*9880d681SAndroid Build Coastguard Workerdefine <32 x i8> @load_splat_32i8_32i8_11111111111111111111111111111111(<32 x i8>* %ptr) nounwind uwtable readnone ssp { 272*9880d681SAndroid Build Coastguard Worker; X32-LABEL: load_splat_32i8_32i8_11111111111111111111111111111111: 273*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: ## %entry 274*9880d681SAndroid Build Coastguard Worker; X32-NEXT: movl {{[0-9]+}}(%esp), %eax 275*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vpbroadcastb 1(%eax), %ymm0 276*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 277*9880d681SAndroid Build Coastguard Worker; 278*9880d681SAndroid Build Coastguard Worker; X64-LABEL: load_splat_32i8_32i8_11111111111111111111111111111111: 279*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: ## %entry 280*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vpbroadcastb 1(%rdi), %ymm0 281*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 282*9880d681SAndroid Build Coastguard Workerentry: 283*9880d681SAndroid Build Coastguard Worker %ld = load <32 x i8>, <32 x i8>* %ptr 284*9880d681SAndroid Build Coastguard Worker %ret = shufflevector <32 x i8> %ld, <32 x i8> undef, <32 x i32> <i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1> 285*9880d681SAndroid Build Coastguard Worker ret <32 x i8> %ret 286*9880d681SAndroid Build Coastguard Worker} 287*9880d681SAndroid Build Coastguard Worker 288*9880d681SAndroid Build Coastguard Workerdefine <8 x i16> @load_splat_8i16_8i16_11111111(<8 x i16>* %ptr) nounwind uwtable readnone ssp { 289*9880d681SAndroid Build Coastguard Worker; X32-LABEL: load_splat_8i16_8i16_11111111: 290*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: ## %entry 291*9880d681SAndroid Build Coastguard Worker; X32-NEXT: movl {{[0-9]+}}(%esp), %eax 292*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vpbroadcastw 2(%eax), %xmm0 293*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 294*9880d681SAndroid Build Coastguard Worker; 295*9880d681SAndroid Build Coastguard Worker; X64-LABEL: load_splat_8i16_8i16_11111111: 296*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: ## %entry 297*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vpbroadcastw 2(%rdi), %xmm0 298*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 299*9880d681SAndroid Build Coastguard Workerentry: 300*9880d681SAndroid Build Coastguard Worker %ld = load <8 x i16>, <8 x i16>* %ptr 301*9880d681SAndroid Build Coastguard Worker %ret = shufflevector <8 x i16> %ld, <8 x i16> undef, <8 x i32> <i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1> 302*9880d681SAndroid Build Coastguard Worker ret <8 x i16> %ret 303*9880d681SAndroid Build Coastguard Worker} 304*9880d681SAndroid Build Coastguard Worker 305*9880d681SAndroid Build Coastguard Workerdefine <16 x i16> @load_splat_16i16_8i16_1111111111111111(<8 x i16>* %ptr) nounwind uwtable readnone ssp { 306*9880d681SAndroid Build Coastguard Worker; X32-LABEL: load_splat_16i16_8i16_1111111111111111: 307*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: ## %entry 308*9880d681SAndroid Build Coastguard Worker; X32-NEXT: movl {{[0-9]+}}(%esp), %eax 309*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vpbroadcastw 2(%eax), %ymm0 310*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 311*9880d681SAndroid Build Coastguard Worker; 312*9880d681SAndroid Build Coastguard Worker; X64-LABEL: load_splat_16i16_8i16_1111111111111111: 313*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: ## %entry 314*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vpbroadcastw 2(%rdi), %ymm0 315*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 316*9880d681SAndroid Build Coastguard Workerentry: 317*9880d681SAndroid Build Coastguard Worker %ld = load <8 x i16>, <8 x i16>* %ptr 318*9880d681SAndroid Build Coastguard Worker %ret = shufflevector <8 x i16> %ld, <8 x i16> undef, <16 x i32> <i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1> 319*9880d681SAndroid Build Coastguard Worker ret <16 x i16> %ret 320*9880d681SAndroid Build Coastguard Worker} 321*9880d681SAndroid Build Coastguard Worker 322*9880d681SAndroid Build Coastguard Workerdefine <16 x i16> @load_splat_16i16_16i16_1111111111111111(<16 x i16>* %ptr) nounwind uwtable readnone ssp { 323*9880d681SAndroid Build Coastguard Worker; X32-LABEL: load_splat_16i16_16i16_1111111111111111: 324*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: ## %entry 325*9880d681SAndroid Build Coastguard Worker; X32-NEXT: movl {{[0-9]+}}(%esp), %eax 326*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vpbroadcastw 2(%eax), %ymm0 327*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 328*9880d681SAndroid Build Coastguard Worker; 329*9880d681SAndroid Build Coastguard Worker; X64-LABEL: load_splat_16i16_16i16_1111111111111111: 330*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: ## %entry 331*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vpbroadcastw 2(%rdi), %ymm0 332*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 333*9880d681SAndroid Build Coastguard Workerentry: 334*9880d681SAndroid Build Coastguard Worker %ld = load <16 x i16>, <16 x i16>* %ptr 335*9880d681SAndroid Build Coastguard Worker %ret = shufflevector <16 x i16> %ld, <16 x i16> undef, <16 x i32> <i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1> 336*9880d681SAndroid Build Coastguard Worker ret <16 x i16> %ret 337*9880d681SAndroid Build Coastguard Worker} 338*9880d681SAndroid Build Coastguard Worker 339*9880d681SAndroid Build Coastguard Workerdefine <4 x i32> @load_splat_4i32_4i32_1111(<4 x i32>* %ptr) nounwind uwtable readnone ssp { 340*9880d681SAndroid Build Coastguard Worker; X32-LABEL: load_splat_4i32_4i32_1111: 341*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: ## %entry 342*9880d681SAndroid Build Coastguard Worker; X32-NEXT: movl {{[0-9]+}}(%esp), %eax 343*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vbroadcastss 4(%eax), %xmm0 344*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 345*9880d681SAndroid Build Coastguard Worker; 346*9880d681SAndroid Build Coastguard Worker; X64-LABEL: load_splat_4i32_4i32_1111: 347*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: ## %entry 348*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vbroadcastss 4(%rdi), %xmm0 349*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 350*9880d681SAndroid Build Coastguard Workerentry: 351*9880d681SAndroid Build Coastguard Worker %ld = load <4 x i32>, <4 x i32>* %ptr 352*9880d681SAndroid Build Coastguard Worker %ret = shufflevector <4 x i32> %ld, <4 x i32> undef, <4 x i32> <i32 1, i32 1, i32 1, i32 1> 353*9880d681SAndroid Build Coastguard Worker ret <4 x i32> %ret 354*9880d681SAndroid Build Coastguard Worker} 355*9880d681SAndroid Build Coastguard Worker 356*9880d681SAndroid Build Coastguard Workerdefine <8 x i32> @load_splat_8i32_4i32_33333333(<4 x i32>* %ptr) nounwind uwtable readnone ssp { 357*9880d681SAndroid Build Coastguard Worker; X32-LABEL: load_splat_8i32_4i32_33333333: 358*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: ## %entry 359*9880d681SAndroid Build Coastguard Worker; X32-NEXT: movl {{[0-9]+}}(%esp), %eax 360*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vbroadcastss 12(%eax), %ymm0 361*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 362*9880d681SAndroid Build Coastguard Worker; 363*9880d681SAndroid Build Coastguard Worker; X64-LABEL: load_splat_8i32_4i32_33333333: 364*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: ## %entry 365*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vbroadcastss 12(%rdi), %ymm0 366*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 367*9880d681SAndroid Build Coastguard Workerentry: 368*9880d681SAndroid Build Coastguard Worker %ld = load <4 x i32>, <4 x i32>* %ptr 369*9880d681SAndroid Build Coastguard Worker %ret = shufflevector <4 x i32> %ld, <4 x i32> undef, <8 x i32> <i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3> 370*9880d681SAndroid Build Coastguard Worker ret <8 x i32> %ret 371*9880d681SAndroid Build Coastguard Worker} 372*9880d681SAndroid Build Coastguard Worker 373*9880d681SAndroid Build Coastguard Workerdefine <8 x i32> @load_splat_8i32_8i32_55555555(<8 x i32>* %ptr) nounwind uwtable readnone ssp { 374*9880d681SAndroid Build Coastguard Worker; X32-LABEL: load_splat_8i32_8i32_55555555: 375*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: ## %entry 376*9880d681SAndroid Build Coastguard Worker; X32-NEXT: movl {{[0-9]+}}(%esp), %eax 377*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vbroadcastss 20(%eax), %ymm0 378*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 379*9880d681SAndroid Build Coastguard Worker; 380*9880d681SAndroid Build Coastguard Worker; X64-LABEL: load_splat_8i32_8i32_55555555: 381*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: ## %entry 382*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vbroadcastss 20(%rdi), %ymm0 383*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 384*9880d681SAndroid Build Coastguard Workerentry: 385*9880d681SAndroid Build Coastguard Worker %ld = load <8 x i32>, <8 x i32>* %ptr 386*9880d681SAndroid Build Coastguard Worker %ret = shufflevector <8 x i32> %ld, <8 x i32> undef, <8 x i32> <i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5> 387*9880d681SAndroid Build Coastguard Worker ret <8 x i32> %ret 388*9880d681SAndroid Build Coastguard Worker} 389*9880d681SAndroid Build Coastguard Worker 390*9880d681SAndroid Build Coastguard Workerdefine <4 x float> @load_splat_4f32_4f32_1111(<4 x float>* %ptr) nounwind uwtable readnone ssp { 391*9880d681SAndroid Build Coastguard Worker; X32-LABEL: load_splat_4f32_4f32_1111: 392*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: ## %entry 393*9880d681SAndroid Build Coastguard Worker; X32-NEXT: movl {{[0-9]+}}(%esp), %eax 394*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vbroadcastss 4(%eax), %xmm0 395*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 396*9880d681SAndroid Build Coastguard Worker; 397*9880d681SAndroid Build Coastguard Worker; X64-LABEL: load_splat_4f32_4f32_1111: 398*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: ## %entry 399*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vbroadcastss 4(%rdi), %xmm0 400*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 401*9880d681SAndroid Build Coastguard Workerentry: 402*9880d681SAndroid Build Coastguard Worker %ld = load <4 x float>, <4 x float>* %ptr 403*9880d681SAndroid Build Coastguard Worker %ret = shufflevector <4 x float> %ld, <4 x float> undef, <4 x i32> <i32 1, i32 1, i32 1, i32 1> 404*9880d681SAndroid Build Coastguard Worker ret <4 x float> %ret 405*9880d681SAndroid Build Coastguard Worker} 406*9880d681SAndroid Build Coastguard Worker 407*9880d681SAndroid Build Coastguard Workerdefine <8 x float> @load_splat_8f32_4f32_33333333(<4 x float>* %ptr) nounwind uwtable readnone ssp { 408*9880d681SAndroid Build Coastguard Worker; X32-LABEL: load_splat_8f32_4f32_33333333: 409*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: ## %entry 410*9880d681SAndroid Build Coastguard Worker; X32-NEXT: movl {{[0-9]+}}(%esp), %eax 411*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vbroadcastss 12(%eax), %ymm0 412*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 413*9880d681SAndroid Build Coastguard Worker; 414*9880d681SAndroid Build Coastguard Worker; X64-LABEL: load_splat_8f32_4f32_33333333: 415*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: ## %entry 416*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vbroadcastss 12(%rdi), %ymm0 417*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 418*9880d681SAndroid Build Coastguard Workerentry: 419*9880d681SAndroid Build Coastguard Worker %ld = load <4 x float>, <4 x float>* %ptr 420*9880d681SAndroid Build Coastguard Worker %ret = shufflevector <4 x float> %ld, <4 x float> undef, <8 x i32> <i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3> 421*9880d681SAndroid Build Coastguard Worker ret <8 x float> %ret 422*9880d681SAndroid Build Coastguard Worker} 423*9880d681SAndroid Build Coastguard Worker 424*9880d681SAndroid Build Coastguard Workerdefine <8 x float> @load_splat_8f32_8f32_55555555(<8 x float>* %ptr) nounwind uwtable readnone ssp { 425*9880d681SAndroid Build Coastguard Worker; X32-LABEL: load_splat_8f32_8f32_55555555: 426*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: ## %entry 427*9880d681SAndroid Build Coastguard Worker; X32-NEXT: movl {{[0-9]+}}(%esp), %eax 428*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vbroadcastss 20(%eax), %ymm0 429*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 430*9880d681SAndroid Build Coastguard Worker; 431*9880d681SAndroid Build Coastguard Worker; X64-LABEL: load_splat_8f32_8f32_55555555: 432*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: ## %entry 433*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vbroadcastss 20(%rdi), %ymm0 434*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 435*9880d681SAndroid Build Coastguard Workerentry: 436*9880d681SAndroid Build Coastguard Worker %ld = load <8 x float>, <8 x float>* %ptr 437*9880d681SAndroid Build Coastguard Worker %ret = shufflevector <8 x float> %ld, <8 x float> undef, <8 x i32> <i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5> 438*9880d681SAndroid Build Coastguard Worker ret <8 x float> %ret 439*9880d681SAndroid Build Coastguard Worker} 440*9880d681SAndroid Build Coastguard Worker 441*9880d681SAndroid Build Coastguard Workerdefine <2 x i64> @load_splat_2i64_2i64_1111(<2 x i64>* %ptr) nounwind uwtable readnone ssp { 442*9880d681SAndroid Build Coastguard Worker; X32-LABEL: load_splat_2i64_2i64_1111: 443*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: ## %entry 444*9880d681SAndroid Build Coastguard Worker; X32-NEXT: movl {{[0-9]+}}(%esp), %eax 445*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vmovddup {{.*#+}} xmm0 = mem[0,0] 446*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 447*9880d681SAndroid Build Coastguard Worker; 448*9880d681SAndroid Build Coastguard Worker; X64-LABEL: load_splat_2i64_2i64_1111: 449*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: ## %entry 450*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vpbroadcastq 8(%rdi), %xmm0 451*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 452*9880d681SAndroid Build Coastguard Workerentry: 453*9880d681SAndroid Build Coastguard Worker %ld = load <2 x i64>, <2 x i64>* %ptr 454*9880d681SAndroid Build Coastguard Worker %ret = shufflevector <2 x i64> %ld, <2 x i64> undef, <2 x i32> <i32 1, i32 1> 455*9880d681SAndroid Build Coastguard Worker ret <2 x i64> %ret 456*9880d681SAndroid Build Coastguard Worker} 457*9880d681SAndroid Build Coastguard Worker 458*9880d681SAndroid Build Coastguard Workerdefine <4 x i64> @load_splat_4i64_2i64_1111(<2 x i64>* %ptr) nounwind uwtable readnone ssp { 459*9880d681SAndroid Build Coastguard Worker; X32-LABEL: load_splat_4i64_2i64_1111: 460*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: ## %entry 461*9880d681SAndroid Build Coastguard Worker; X32-NEXT: movl {{[0-9]+}}(%esp), %eax 462*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vbroadcastsd 8(%eax), %ymm0 463*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 464*9880d681SAndroid Build Coastguard Worker; 465*9880d681SAndroid Build Coastguard Worker; X64-LABEL: load_splat_4i64_2i64_1111: 466*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: ## %entry 467*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vbroadcastsd 8(%rdi), %ymm0 468*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 469*9880d681SAndroid Build Coastguard Workerentry: 470*9880d681SAndroid Build Coastguard Worker %ld = load <2 x i64>, <2 x i64>* %ptr 471*9880d681SAndroid Build Coastguard Worker %ret = shufflevector <2 x i64> %ld, <2 x i64> undef, <4 x i32> <i32 1, i32 1, i32 1, i32 1> 472*9880d681SAndroid Build Coastguard Worker ret <4 x i64> %ret 473*9880d681SAndroid Build Coastguard Worker} 474*9880d681SAndroid Build Coastguard Worker 475*9880d681SAndroid Build Coastguard Workerdefine <4 x i64> @load_splat_4i64_4i64_2222(<4 x i64>* %ptr) nounwind uwtable readnone ssp { 476*9880d681SAndroid Build Coastguard Worker; X32-LABEL: load_splat_4i64_4i64_2222: 477*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: ## %entry 478*9880d681SAndroid Build Coastguard Worker; X32-NEXT: movl {{[0-9]+}}(%esp), %eax 479*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vbroadcastsd 16(%eax), %ymm0 480*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 481*9880d681SAndroid Build Coastguard Worker; 482*9880d681SAndroid Build Coastguard Worker; X64-LABEL: load_splat_4i64_4i64_2222: 483*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: ## %entry 484*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vbroadcastsd 16(%rdi), %ymm0 485*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 486*9880d681SAndroid Build Coastguard Workerentry: 487*9880d681SAndroid Build Coastguard Worker %ld = load <4 x i64>, <4 x i64>* %ptr 488*9880d681SAndroid Build Coastguard Worker %ret = shufflevector <4 x i64> %ld, <4 x i64> undef, <4 x i32> <i32 2, i32 2, i32 2, i32 2> 489*9880d681SAndroid Build Coastguard Worker ret <4 x i64> %ret 490*9880d681SAndroid Build Coastguard Worker} 491*9880d681SAndroid Build Coastguard Worker 492*9880d681SAndroid Build Coastguard Workerdefine <2 x double> @load_splat_2f64_2f64_1111(<2 x double>* %ptr) nounwind uwtable readnone ssp { 493*9880d681SAndroid Build Coastguard Worker; X32-LABEL: load_splat_2f64_2f64_1111: 494*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: ## %entry 495*9880d681SAndroid Build Coastguard Worker; X32-NEXT: movl {{[0-9]+}}(%esp), %eax 496*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vmovddup {{.*#+}} xmm0 = mem[0,0] 497*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 498*9880d681SAndroid Build Coastguard Worker; 499*9880d681SAndroid Build Coastguard Worker; X64-LABEL: load_splat_2f64_2f64_1111: 500*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: ## %entry 501*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vmovddup {{.*#+}} xmm0 = mem[0,0] 502*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 503*9880d681SAndroid Build Coastguard Workerentry: 504*9880d681SAndroid Build Coastguard Worker %ld = load <2 x double>, <2 x double>* %ptr 505*9880d681SAndroid Build Coastguard Worker %ret = shufflevector <2 x double> %ld, <2 x double> undef, <2 x i32> <i32 1, i32 1> 506*9880d681SAndroid Build Coastguard Worker ret <2 x double> %ret 507*9880d681SAndroid Build Coastguard Worker} 508*9880d681SAndroid Build Coastguard Worker 509*9880d681SAndroid Build Coastguard Workerdefine <4 x double> @load_splat_4f64_2f64_1111(<2 x double>* %ptr) nounwind uwtable readnone ssp { 510*9880d681SAndroid Build Coastguard Worker; X32-LABEL: load_splat_4f64_2f64_1111: 511*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: ## %entry 512*9880d681SAndroid Build Coastguard Worker; X32-NEXT: movl {{[0-9]+}}(%esp), %eax 513*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vbroadcastsd 8(%eax), %ymm0 514*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 515*9880d681SAndroid Build Coastguard Worker; 516*9880d681SAndroid Build Coastguard Worker; X64-LABEL: load_splat_4f64_2f64_1111: 517*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: ## %entry 518*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vbroadcastsd 8(%rdi), %ymm0 519*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 520*9880d681SAndroid Build Coastguard Workerentry: 521*9880d681SAndroid Build Coastguard Worker %ld = load <2 x double>, <2 x double>* %ptr 522*9880d681SAndroid Build Coastguard Worker %ret = shufflevector <2 x double> %ld, <2 x double> undef, <4 x i32> <i32 1, i32 1, i32 1, i32 1> 523*9880d681SAndroid Build Coastguard Worker ret <4 x double> %ret 524*9880d681SAndroid Build Coastguard Worker} 525*9880d681SAndroid Build Coastguard Worker 526*9880d681SAndroid Build Coastguard Workerdefine <4 x double> @load_splat_4f64_4f64_2222(<4 x double>* %ptr) nounwind uwtable readnone ssp { 527*9880d681SAndroid Build Coastguard Worker; X32-LABEL: load_splat_4f64_4f64_2222: 528*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: ## %entry 529*9880d681SAndroid Build Coastguard Worker; X32-NEXT: movl {{[0-9]+}}(%esp), %eax 530*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vbroadcastsd 16(%eax), %ymm0 531*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 532*9880d681SAndroid Build Coastguard Worker; 533*9880d681SAndroid Build Coastguard Worker; X64-LABEL: load_splat_4f64_4f64_2222: 534*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: ## %entry 535*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vbroadcastsd 16(%rdi), %ymm0 536*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 537*9880d681SAndroid Build Coastguard Workerentry: 538*9880d681SAndroid Build Coastguard Worker %ld = load <4 x double>, <4 x double>* %ptr 539*9880d681SAndroid Build Coastguard Worker %ret = shufflevector <4 x double> %ld, <4 x double> undef, <4 x i32> <i32 2, i32 2, i32 2, i32 2> 540*9880d681SAndroid Build Coastguard Worker ret <4 x double> %ret 541*9880d681SAndroid Build Coastguard Worker} 542*9880d681SAndroid Build Coastguard Worker 543*9880d681SAndroid Build Coastguard Worker; make sure that we still don't support broadcast double into 128-bit vector 544*9880d681SAndroid Build Coastguard Worker; this used to crash 545*9880d681SAndroid Build Coastguard Workerdefine <2 x double> @I(double* %ptr) nounwind uwtable readnone ssp { 546*9880d681SAndroid Build Coastguard Worker; X32-LABEL: I: 547*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: ## %entry 548*9880d681SAndroid Build Coastguard Worker; X32-NEXT: movl {{[0-9]+}}(%esp), %eax 549*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vmovddup {{.*#+}} xmm0 = mem[0,0] 550*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 551*9880d681SAndroid Build Coastguard Worker; 552*9880d681SAndroid Build Coastguard Worker; X64-LABEL: I: 553*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: ## %entry 554*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vmovddup {{.*#+}} xmm0 = mem[0,0] 555*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 556*9880d681SAndroid Build Coastguard Workerentry: 557*9880d681SAndroid Build Coastguard Worker %q = load double, double* %ptr, align 4 558*9880d681SAndroid Build Coastguard Worker %vecinit.i = insertelement <2 x double> undef, double %q, i32 0 559*9880d681SAndroid Build Coastguard Worker %vecinit2.i = insertelement <2 x double> %vecinit.i, double %q, i32 1 560*9880d681SAndroid Build Coastguard Worker ret <2 x double> %vecinit2.i 561*9880d681SAndroid Build Coastguard Worker} 562*9880d681SAndroid Build Coastguard Worker 563*9880d681SAndroid Build Coastguard Workerdefine <8 x i32> @V111(<8 x i32> %in) nounwind uwtable readnone ssp { 564*9880d681SAndroid Build Coastguard Worker; X32-LABEL: V111: 565*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: ## %entry 566*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vpbroadcastd LCPI27_0, %ymm1 567*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vpaddd %ymm1, %ymm0, %ymm0 568*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 569*9880d681SAndroid Build Coastguard Worker; 570*9880d681SAndroid Build Coastguard Worker; X64-LABEL: V111: 571*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: ## %entry 572*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vpbroadcastd {{.*}}(%rip), %ymm1 573*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vpaddd %ymm1, %ymm0, %ymm0 574*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 575*9880d681SAndroid Build Coastguard Workerentry: 576*9880d681SAndroid Build Coastguard Worker %g = add <8 x i32> %in, <i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1> 577*9880d681SAndroid Build Coastguard Worker ret <8 x i32> %g 578*9880d681SAndroid Build Coastguard Worker} 579*9880d681SAndroid Build Coastguard Worker 580*9880d681SAndroid Build Coastguard Workerdefine <8 x float> @V113(<8 x float> %in) nounwind uwtable readnone ssp { 581*9880d681SAndroid Build Coastguard Worker; X32-LABEL: V113: 582*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: ## %entry 583*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vbroadcastss LCPI28_0, %ymm1 584*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vaddps %ymm1, %ymm0, %ymm0 585*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 586*9880d681SAndroid Build Coastguard Worker; 587*9880d681SAndroid Build Coastguard Worker; X64-LABEL: V113: 588*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: ## %entry 589*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vbroadcastss {{.*}}(%rip), %ymm1 590*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vaddps %ymm1, %ymm0, %ymm0 591*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 592*9880d681SAndroid Build Coastguard Workerentry: 593*9880d681SAndroid Build Coastguard Worker %g = fadd <8 x float> %in, <float 0xbf80000000000000, float 0xbf80000000000000, float 0xbf80000000000000, float 0xbf80000000000000, float 0xbf80000000000000, float 0xbf80000000000000, float 0xbf80000000000000, float 0xbf80000000000000> 594*9880d681SAndroid Build Coastguard Worker ret <8 x float> %g 595*9880d681SAndroid Build Coastguard Worker} 596*9880d681SAndroid Build Coastguard Worker 597*9880d681SAndroid Build Coastguard Workerdefine <4 x float> @_e2(float* %ptr) nounwind uwtable readnone ssp { 598*9880d681SAndroid Build Coastguard Worker; X32-LABEL: _e2: 599*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: 600*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vbroadcastss LCPI29_0, %xmm0 601*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 602*9880d681SAndroid Build Coastguard Worker; 603*9880d681SAndroid Build Coastguard Worker; X64-LABEL: _e2: 604*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: 605*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vbroadcastss {{.*}}(%rip), %xmm0 606*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 607*9880d681SAndroid Build Coastguard Worker %vecinit.i = insertelement <4 x float> undef, float 0xbf80000000000000, i32 0 608*9880d681SAndroid Build Coastguard Worker %vecinit2.i = insertelement <4 x float> %vecinit.i, float 0xbf80000000000000, i32 1 609*9880d681SAndroid Build Coastguard Worker %vecinit4.i = insertelement <4 x float> %vecinit2.i, float 0xbf80000000000000, i32 2 610*9880d681SAndroid Build Coastguard Worker %vecinit6.i = insertelement <4 x float> %vecinit4.i, float 0xbf80000000000000, i32 3 611*9880d681SAndroid Build Coastguard Worker ret <4 x float> %vecinit6.i 612*9880d681SAndroid Build Coastguard Worker} 613*9880d681SAndroid Build Coastguard Worker 614*9880d681SAndroid Build Coastguard Workerdefine <8 x i8> @_e4(i8* %ptr) nounwind uwtable readnone ssp { 615*9880d681SAndroid Build Coastguard Worker; X32-LABEL: _e4: 616*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: 617*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vmovaps {{.*#+}} xmm0 = [52,52,52,52,52,52,52,52] 618*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 619*9880d681SAndroid Build Coastguard Worker; 620*9880d681SAndroid Build Coastguard Worker; X64-LABEL: _e4: 621*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: 622*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vmovaps {{.*#+}} xmm0 = [52,52,52,52,52,52,52,52] 623*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 624*9880d681SAndroid Build Coastguard Worker %vecinit0.i = insertelement <8 x i8> undef, i8 52, i32 0 625*9880d681SAndroid Build Coastguard Worker %vecinit1.i = insertelement <8 x i8> %vecinit0.i, i8 52, i32 1 626*9880d681SAndroid Build Coastguard Worker %vecinit2.i = insertelement <8 x i8> %vecinit1.i, i8 52, i32 2 627*9880d681SAndroid Build Coastguard Worker %vecinit3.i = insertelement <8 x i8> %vecinit2.i, i8 52, i32 3 628*9880d681SAndroid Build Coastguard Worker %vecinit4.i = insertelement <8 x i8> %vecinit3.i, i8 52, i32 4 629*9880d681SAndroid Build Coastguard Worker %vecinit5.i = insertelement <8 x i8> %vecinit4.i, i8 52, i32 5 630*9880d681SAndroid Build Coastguard Worker %vecinit6.i = insertelement <8 x i8> %vecinit5.i, i8 52, i32 6 631*9880d681SAndroid Build Coastguard Worker %vecinit7.i = insertelement <8 x i8> %vecinit6.i, i8 52, i32 7 632*9880d681SAndroid Build Coastguard Worker ret <8 x i8> %vecinit7.i 633*9880d681SAndroid Build Coastguard Worker} 634*9880d681SAndroid Build Coastguard Worker 635*9880d681SAndroid Build Coastguard Workerdefine void @crash() nounwind alwaysinline { 636*9880d681SAndroid Build Coastguard Worker; X32-LABEL: crash: 637*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: ## %WGLoopsEntry 638*9880d681SAndroid Build Coastguard Worker; X32-NEXT: xorl %eax, %eax 639*9880d681SAndroid Build Coastguard Worker; X32-NEXT: testb %al, %al 640*9880d681SAndroid Build Coastguard Worker; X32-NEXT: je LBB31_1 641*9880d681SAndroid Build Coastguard Worker; X32-NEXT: ## BB#2: ## %ret 642*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 643*9880d681SAndroid Build Coastguard Worker; X32-NEXT: .p2align 4, 0x90 644*9880d681SAndroid Build Coastguard Worker; X32-NEXT: LBB31_1: ## %footer349VF 645*9880d681SAndroid Build Coastguard Worker; X32-NEXT: ## =>This Inner Loop Header: Depth=1 646*9880d681SAndroid Build Coastguard Worker; X32-NEXT: jmp LBB31_1 647*9880d681SAndroid Build Coastguard Worker; 648*9880d681SAndroid Build Coastguard Worker; X64-LABEL: crash: 649*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: ## %WGLoopsEntry 650*9880d681SAndroid Build Coastguard Worker; X64-NEXT: xorl %eax, %eax 651*9880d681SAndroid Build Coastguard Worker; X64-NEXT: testb %al, %al 652*9880d681SAndroid Build Coastguard Worker; X64-NEXT: je LBB31_1 653*9880d681SAndroid Build Coastguard Worker; X64-NEXT: ## BB#2: ## %ret 654*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 655*9880d681SAndroid Build Coastguard Worker; X64-NEXT: .p2align 4, 0x90 656*9880d681SAndroid Build Coastguard Worker; X64-NEXT: LBB31_1: ## %footer349VF 657*9880d681SAndroid Build Coastguard Worker; X64-NEXT: ## =>This Inner Loop Header: Depth=1 658*9880d681SAndroid Build Coastguard Worker; X64-NEXT: jmp LBB31_1 659*9880d681SAndroid Build Coastguard WorkerWGLoopsEntry: 660*9880d681SAndroid Build Coastguard Worker br i1 undef, label %ret, label %footer329VF 661*9880d681SAndroid Build Coastguard Worker 662*9880d681SAndroid Build Coastguard Workerfooter329VF: 663*9880d681SAndroid Build Coastguard Worker %A.0.inVF = fmul float undef, 6.553600e+04 664*9880d681SAndroid Build Coastguard Worker %B.0.in407VF = fmul <8 x float> undef, <float 6.553600e+04, float 6.553600e+04, float 6.553600e+04, float 6.553600e+04, float 6.553600e+04, float 6.553600e+04, float 6.553600e+04, float 6.553600e+04> 665*9880d681SAndroid Build Coastguard Worker %A.0VF = fptosi float %A.0.inVF to i32 666*9880d681SAndroid Build Coastguard Worker %B.0408VF = fptosi <8 x float> %B.0.in407VF to <8 x i32> 667*9880d681SAndroid Build Coastguard Worker %0 = and <8 x i32> %B.0408VF, <i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535> 668*9880d681SAndroid Build Coastguard Worker %1 = and i32 %A.0VF, 65535 669*9880d681SAndroid Build Coastguard Worker %temp1098VF = insertelement <8 x i32> undef, i32 %1, i32 0 670*9880d681SAndroid Build Coastguard Worker %vector1099VF = shufflevector <8 x i32> %temp1098VF, <8 x i32> undef, <8 x i32> zeroinitializer 671*9880d681SAndroid Build Coastguard Worker br i1 undef, label %preload1201VF, label %footer349VF 672*9880d681SAndroid Build Coastguard Worker 673*9880d681SAndroid Build Coastguard Workerpreload1201VF: 674*9880d681SAndroid Build Coastguard Worker br label %footer349VF 675*9880d681SAndroid Build Coastguard Worker 676*9880d681SAndroid Build Coastguard Workerfooter349VF: 677*9880d681SAndroid Build Coastguard Worker %2 = mul nsw <8 x i32> undef, %0 678*9880d681SAndroid Build Coastguard Worker %3 = mul nsw <8 x i32> undef, %vector1099VF 679*9880d681SAndroid Build Coastguard Worker br label %footer329VF 680*9880d681SAndroid Build Coastguard Worker 681*9880d681SAndroid Build Coastguard Workerret: 682*9880d681SAndroid Build Coastguard Worker ret void 683*9880d681SAndroid Build Coastguard Worker} 684*9880d681SAndroid Build Coastguard Worker 685*9880d681SAndroid Build Coastguard Workerdefine <8 x i32> @_inreg0(i32 %scalar) nounwind uwtable readnone ssp { 686*9880d681SAndroid Build Coastguard Worker; X32-LABEL: _inreg0: 687*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: 688*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vbroadcastss {{[0-9]+}}(%esp), %ymm0 689*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 690*9880d681SAndroid Build Coastguard Worker; 691*9880d681SAndroid Build Coastguard Worker; X64-LABEL: _inreg0: 692*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: 693*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vmovd %edi, %xmm0 694*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vbroadcastss %xmm0, %ymm0 695*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 696*9880d681SAndroid Build Coastguard Worker %in = insertelement <8 x i32> undef, i32 %scalar, i32 0 697*9880d681SAndroid Build Coastguard Worker %wide = shufflevector <8 x i32> %in, <8 x i32> undef, <8 x i32> zeroinitializer 698*9880d681SAndroid Build Coastguard Worker ret <8 x i32> %wide 699*9880d681SAndroid Build Coastguard Worker} 700*9880d681SAndroid Build Coastguard Worker 701*9880d681SAndroid Build Coastguard Workerdefine <8 x float> @_inreg1(float %scalar) nounwind uwtable readnone ssp { 702*9880d681SAndroid Build Coastguard Worker; X32-LABEL: _inreg1: 703*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: 704*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vbroadcastss {{[0-9]+}}(%esp), %ymm0 705*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 706*9880d681SAndroid Build Coastguard Worker; 707*9880d681SAndroid Build Coastguard Worker; X64-LABEL: _inreg1: 708*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: 709*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vbroadcastss %xmm0, %ymm0 710*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 711*9880d681SAndroid Build Coastguard Worker %in = insertelement <8 x float> undef, float %scalar, i32 0 712*9880d681SAndroid Build Coastguard Worker %wide = shufflevector <8 x float> %in, <8 x float> undef, <8 x i32> zeroinitializer 713*9880d681SAndroid Build Coastguard Worker ret <8 x float> %wide 714*9880d681SAndroid Build Coastguard Worker} 715*9880d681SAndroid Build Coastguard Worker 716*9880d681SAndroid Build Coastguard Workerdefine <4 x float> @_inreg2(float %scalar) nounwind uwtable readnone ssp { 717*9880d681SAndroid Build Coastguard Worker; X32-LABEL: _inreg2: 718*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: 719*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vbroadcastss {{[0-9]+}}(%esp), %xmm0 720*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 721*9880d681SAndroid Build Coastguard Worker; 722*9880d681SAndroid Build Coastguard Worker; X64-LABEL: _inreg2: 723*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: 724*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vbroadcastss %xmm0, %xmm0 725*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 726*9880d681SAndroid Build Coastguard Worker %in = insertelement <4 x float> undef, float %scalar, i32 0 727*9880d681SAndroid Build Coastguard Worker %wide = shufflevector <4 x float> %in, <4 x float> undef, <4 x i32> zeroinitializer 728*9880d681SAndroid Build Coastguard Worker ret <4 x float> %wide 729*9880d681SAndroid Build Coastguard Worker} 730*9880d681SAndroid Build Coastguard Worker 731*9880d681SAndroid Build Coastguard Workerdefine <4 x double> @_inreg3(double %scalar) nounwind uwtable readnone ssp { 732*9880d681SAndroid Build Coastguard Worker; X32-LABEL: _inreg3: 733*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: 734*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vbroadcastsd {{[0-9]+}}(%esp), %ymm0 735*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 736*9880d681SAndroid Build Coastguard Worker; 737*9880d681SAndroid Build Coastguard Worker; X64-LABEL: _inreg3: 738*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: 739*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vbroadcastsd %xmm0, %ymm0 740*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 741*9880d681SAndroid Build Coastguard Worker %in = insertelement <4 x double> undef, double %scalar, i32 0 742*9880d681SAndroid Build Coastguard Worker %wide = shufflevector <4 x double> %in, <4 x double> undef, <4 x i32> zeroinitializer 743*9880d681SAndroid Build Coastguard Worker ret <4 x double> %wide 744*9880d681SAndroid Build Coastguard Worker} 745*9880d681SAndroid Build Coastguard Worker 746*9880d681SAndroid Build Coastguard Workerdefine <8 x float> @_inreg8xfloat(<8 x float> %a) { 747*9880d681SAndroid Build Coastguard Worker; X32-LABEL: _inreg8xfloat: 748*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: 749*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vbroadcastss %xmm0, %ymm0 750*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 751*9880d681SAndroid Build Coastguard Worker; 752*9880d681SAndroid Build Coastguard Worker; X64-LABEL: _inreg8xfloat: 753*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: 754*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vbroadcastss %xmm0, %ymm0 755*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 756*9880d681SAndroid Build Coastguard Worker %b = shufflevector <8 x float> %a, <8 x float> undef, <8 x i32> zeroinitializer 757*9880d681SAndroid Build Coastguard Worker ret <8 x float> %b 758*9880d681SAndroid Build Coastguard Worker} 759*9880d681SAndroid Build Coastguard Worker 760*9880d681SAndroid Build Coastguard Workerdefine <4 x float> @_inreg4xfloat(<4 x float> %a) { 761*9880d681SAndroid Build Coastguard Worker; X32-LABEL: _inreg4xfloat: 762*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: 763*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vbroadcastss %xmm0, %xmm0 764*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 765*9880d681SAndroid Build Coastguard Worker; 766*9880d681SAndroid Build Coastguard Worker; X64-LABEL: _inreg4xfloat: 767*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: 768*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vbroadcastss %xmm0, %xmm0 769*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 770*9880d681SAndroid Build Coastguard Worker %b = shufflevector <4 x float> %a, <4 x float> undef, <4 x i32> zeroinitializer 771*9880d681SAndroid Build Coastguard Worker ret <4 x float> %b 772*9880d681SAndroid Build Coastguard Worker} 773*9880d681SAndroid Build Coastguard Worker 774*9880d681SAndroid Build Coastguard Workerdefine <16 x i16> @_inreg16xi16(<16 x i16> %a) { 775*9880d681SAndroid Build Coastguard Worker; X32-LABEL: _inreg16xi16: 776*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: 777*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vpbroadcastw %xmm0, %ymm0 778*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 779*9880d681SAndroid Build Coastguard Worker; 780*9880d681SAndroid Build Coastguard Worker; X64-LABEL: _inreg16xi16: 781*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: 782*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vpbroadcastw %xmm0, %ymm0 783*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 784*9880d681SAndroid Build Coastguard Worker %b = shufflevector <16 x i16> %a, <16 x i16> undef, <16 x i32> zeroinitializer 785*9880d681SAndroid Build Coastguard Worker ret <16 x i16> %b 786*9880d681SAndroid Build Coastguard Worker} 787*9880d681SAndroid Build Coastguard Worker 788*9880d681SAndroid Build Coastguard Workerdefine <8 x i16> @_inreg8xi16(<8 x i16> %a) { 789*9880d681SAndroid Build Coastguard Worker; X32-LABEL: _inreg8xi16: 790*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: 791*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vpbroadcastw %xmm0, %xmm0 792*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 793*9880d681SAndroid Build Coastguard Worker; 794*9880d681SAndroid Build Coastguard Worker; X64-LABEL: _inreg8xi16: 795*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: 796*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vpbroadcastw %xmm0, %xmm0 797*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 798*9880d681SAndroid Build Coastguard Worker %b = shufflevector <8 x i16> %a, <8 x i16> undef, <8 x i32> zeroinitializer 799*9880d681SAndroid Build Coastguard Worker ret <8 x i16> %b 800*9880d681SAndroid Build Coastguard Worker} 801*9880d681SAndroid Build Coastguard Worker 802*9880d681SAndroid Build Coastguard Workerdefine <4 x i64> @_inreg4xi64(<4 x i64> %a) { 803*9880d681SAndroid Build Coastguard Worker; X32-LABEL: _inreg4xi64: 804*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: 805*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vbroadcastsd %xmm0, %ymm0 806*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 807*9880d681SAndroid Build Coastguard Worker; 808*9880d681SAndroid Build Coastguard Worker; X64-LABEL: _inreg4xi64: 809*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: 810*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vbroadcastsd %xmm0, %ymm0 811*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 812*9880d681SAndroid Build Coastguard Worker %b = shufflevector <4 x i64> %a, <4 x i64> undef, <4 x i32> zeroinitializer 813*9880d681SAndroid Build Coastguard Worker ret <4 x i64> %b 814*9880d681SAndroid Build Coastguard Worker} 815*9880d681SAndroid Build Coastguard Worker 816*9880d681SAndroid Build Coastguard Workerdefine <2 x i64> @_inreg2xi64(<2 x i64> %a) { 817*9880d681SAndroid Build Coastguard Worker; X32-LABEL: _inreg2xi64: 818*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: 819*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vpbroadcastq %xmm0, %xmm0 820*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 821*9880d681SAndroid Build Coastguard Worker; 822*9880d681SAndroid Build Coastguard Worker; X64-LABEL: _inreg2xi64: 823*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: 824*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vpbroadcastq %xmm0, %xmm0 825*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 826*9880d681SAndroid Build Coastguard Worker %b = shufflevector <2 x i64> %a, <2 x i64> undef, <2 x i32> zeroinitializer 827*9880d681SAndroid Build Coastguard Worker ret <2 x i64> %b 828*9880d681SAndroid Build Coastguard Worker} 829*9880d681SAndroid Build Coastguard Worker 830*9880d681SAndroid Build Coastguard Workerdefine <4 x double> @_inreg4xdouble(<4 x double> %a) { 831*9880d681SAndroid Build Coastguard Worker; X32-LABEL: _inreg4xdouble: 832*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: 833*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vbroadcastsd %xmm0, %ymm0 834*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 835*9880d681SAndroid Build Coastguard Worker; 836*9880d681SAndroid Build Coastguard Worker; X64-LABEL: _inreg4xdouble: 837*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: 838*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vbroadcastsd %xmm0, %ymm0 839*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 840*9880d681SAndroid Build Coastguard Worker %b = shufflevector <4 x double> %a, <4 x double> undef, <4 x i32> zeroinitializer 841*9880d681SAndroid Build Coastguard Worker ret <4 x double> %b 842*9880d681SAndroid Build Coastguard Worker} 843*9880d681SAndroid Build Coastguard Worker 844*9880d681SAndroid Build Coastguard Workerdefine <2 x double> @_inreg2xdouble(<2 x double> %a) { 845*9880d681SAndroid Build Coastguard Worker; X32-LABEL: _inreg2xdouble: 846*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: 847*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vmovddup {{.*#+}} xmm0 = xmm0[0,0] 848*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 849*9880d681SAndroid Build Coastguard Worker; 850*9880d681SAndroid Build Coastguard Worker; X64-LABEL: _inreg2xdouble: 851*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: 852*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vmovddup {{.*#+}} xmm0 = xmm0[0,0] 853*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 854*9880d681SAndroid Build Coastguard Worker %b = shufflevector <2 x double> %a, <2 x double> undef, <2 x i32> zeroinitializer 855*9880d681SAndroid Build Coastguard Worker ret <2 x double> %b 856*9880d681SAndroid Build Coastguard Worker} 857*9880d681SAndroid Build Coastguard Worker 858*9880d681SAndroid Build Coastguard Workerdefine <8 x i32> @_inreg8xi32(<8 x i32> %a) { 859*9880d681SAndroid Build Coastguard Worker; X32-LABEL: _inreg8xi32: 860*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: 861*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vbroadcastss %xmm0, %ymm0 862*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 863*9880d681SAndroid Build Coastguard Worker; 864*9880d681SAndroid Build Coastguard Worker; X64-LABEL: _inreg8xi32: 865*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: 866*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vbroadcastss %xmm0, %ymm0 867*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 868*9880d681SAndroid Build Coastguard Worker %b = shufflevector <8 x i32> %a, <8 x i32> undef, <8 x i32> zeroinitializer 869*9880d681SAndroid Build Coastguard Worker ret <8 x i32> %b 870*9880d681SAndroid Build Coastguard Worker} 871*9880d681SAndroid Build Coastguard Worker 872*9880d681SAndroid Build Coastguard Workerdefine <4 x i32> @_inreg4xi32(<4 x i32> %a) { 873*9880d681SAndroid Build Coastguard Worker; X32-LABEL: _inreg4xi32: 874*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: 875*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vbroadcastss %xmm0, %xmm0 876*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 877*9880d681SAndroid Build Coastguard Worker; 878*9880d681SAndroid Build Coastguard Worker; X64-LABEL: _inreg4xi32: 879*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: 880*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vbroadcastss %xmm0, %xmm0 881*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 882*9880d681SAndroid Build Coastguard Worker %b = shufflevector <4 x i32> %a, <4 x i32> undef, <4 x i32> zeroinitializer 883*9880d681SAndroid Build Coastguard Worker ret <4 x i32> %b 884*9880d681SAndroid Build Coastguard Worker} 885*9880d681SAndroid Build Coastguard Worker 886*9880d681SAndroid Build Coastguard Workerdefine <32 x i8> @_inreg32xi8(<32 x i8> %a) { 887*9880d681SAndroid Build Coastguard Worker; X32-LABEL: _inreg32xi8: 888*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: 889*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vpbroadcastb %xmm0, %ymm0 890*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 891*9880d681SAndroid Build Coastguard Worker; 892*9880d681SAndroid Build Coastguard Worker; X64-LABEL: _inreg32xi8: 893*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: 894*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vpbroadcastb %xmm0, %ymm0 895*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 896*9880d681SAndroid Build Coastguard Worker %b = shufflevector <32 x i8> %a, <32 x i8> undef, <32 x i32> zeroinitializer 897*9880d681SAndroid Build Coastguard Worker ret <32 x i8> %b 898*9880d681SAndroid Build Coastguard Worker} 899*9880d681SAndroid Build Coastguard Worker 900*9880d681SAndroid Build Coastguard Workerdefine <16 x i8> @_inreg16xi8(<16 x i8> %a) { 901*9880d681SAndroid Build Coastguard Worker; X32-LABEL: _inreg16xi8: 902*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: 903*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vpbroadcastb %xmm0, %xmm0 904*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 905*9880d681SAndroid Build Coastguard Worker; 906*9880d681SAndroid Build Coastguard Worker; X64-LABEL: _inreg16xi8: 907*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: 908*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vpbroadcastb %xmm0, %xmm0 909*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 910*9880d681SAndroid Build Coastguard Worker %b = shufflevector <16 x i8> %a, <16 x i8> undef, <16 x i32> zeroinitializer 911*9880d681SAndroid Build Coastguard Worker ret <16 x i8> %b 912*9880d681SAndroid Build Coastguard Worker} 913*9880d681SAndroid Build Coastguard Worker 914*9880d681SAndroid Build Coastguard Worker; These tests check that a vbroadcast instruction is used when we have a splat 915*9880d681SAndroid Build Coastguard Worker; formed from a concat_vectors (via the shufflevector) of two BUILD_VECTORs 916*9880d681SAndroid Build Coastguard Worker; (via the insertelements). 917*9880d681SAndroid Build Coastguard Worker 918*9880d681SAndroid Build Coastguard Workerdefine <8 x float> @splat_concat1(float %f) { 919*9880d681SAndroid Build Coastguard Worker; X32-LABEL: splat_concat1: 920*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: 921*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vbroadcastss {{[0-9]+}}(%esp), %ymm0 922*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 923*9880d681SAndroid Build Coastguard Worker; 924*9880d681SAndroid Build Coastguard Worker; X64-LABEL: splat_concat1: 925*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: 926*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vbroadcastss %xmm0, %ymm0 927*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 928*9880d681SAndroid Build Coastguard Worker %1 = insertelement <4 x float> undef, float %f, i32 0 929*9880d681SAndroid Build Coastguard Worker %2 = insertelement <4 x float> %1, float %f, i32 1 930*9880d681SAndroid Build Coastguard Worker %3 = insertelement <4 x float> %2, float %f, i32 2 931*9880d681SAndroid Build Coastguard Worker %4 = insertelement <4 x float> %3, float %f, i32 3 932*9880d681SAndroid Build Coastguard Worker %5 = shufflevector <4 x float> %4, <4 x float> undef, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3> 933*9880d681SAndroid Build Coastguard Worker ret <8 x float> %5 934*9880d681SAndroid Build Coastguard Worker} 935*9880d681SAndroid Build Coastguard Worker 936*9880d681SAndroid Build Coastguard Workerdefine <8 x float> @splat_concat2(float %f) { 937*9880d681SAndroid Build Coastguard Worker; X32-LABEL: splat_concat2: 938*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: 939*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vbroadcastss {{[0-9]+}}(%esp), %ymm0 940*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 941*9880d681SAndroid Build Coastguard Worker; 942*9880d681SAndroid Build Coastguard Worker; X64-LABEL: splat_concat2: 943*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: 944*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vbroadcastss %xmm0, %ymm0 945*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 946*9880d681SAndroid Build Coastguard Worker %1 = insertelement <4 x float> undef, float %f, i32 0 947*9880d681SAndroid Build Coastguard Worker %2 = insertelement <4 x float> %1, float %f, i32 1 948*9880d681SAndroid Build Coastguard Worker %3 = insertelement <4 x float> %2, float %f, i32 2 949*9880d681SAndroid Build Coastguard Worker %4 = insertelement <4 x float> %3, float %f, i32 3 950*9880d681SAndroid Build Coastguard Worker %5 = insertelement <4 x float> undef, float %f, i32 0 951*9880d681SAndroid Build Coastguard Worker %6 = insertelement <4 x float> %5, float %f, i32 1 952*9880d681SAndroid Build Coastguard Worker %7 = insertelement <4 x float> %6, float %f, i32 2 953*9880d681SAndroid Build Coastguard Worker %8 = insertelement <4 x float> %7, float %f, i32 3 954*9880d681SAndroid Build Coastguard Worker %9 = shufflevector <4 x float> %4, <4 x float> %8, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7> 955*9880d681SAndroid Build Coastguard Worker ret <8 x float> %9 956*9880d681SAndroid Build Coastguard Worker} 957*9880d681SAndroid Build Coastguard Worker 958*9880d681SAndroid Build Coastguard Workerdefine <4 x double> @splat_concat3(double %d) { 959*9880d681SAndroid Build Coastguard Worker; X32-LABEL: splat_concat3: 960*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: 961*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vbroadcastsd {{[0-9]+}}(%esp), %ymm0 962*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 963*9880d681SAndroid Build Coastguard Worker; 964*9880d681SAndroid Build Coastguard Worker; X64-LABEL: splat_concat3: 965*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: 966*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vbroadcastsd %xmm0, %ymm0 967*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 968*9880d681SAndroid Build Coastguard Worker %1 = insertelement <2 x double> undef, double %d, i32 0 969*9880d681SAndroid Build Coastguard Worker %2 = insertelement <2 x double> %1, double %d, i32 1 970*9880d681SAndroid Build Coastguard Worker %3 = shufflevector <2 x double> %2, <2 x double> undef, <4 x i32> <i32 0, i32 1, i32 0, i32 1> 971*9880d681SAndroid Build Coastguard Worker ret <4 x double> %3 972*9880d681SAndroid Build Coastguard Worker} 973*9880d681SAndroid Build Coastguard Worker 974*9880d681SAndroid Build Coastguard Workerdefine <4 x double> @splat_concat4(double %d) { 975*9880d681SAndroid Build Coastguard Worker; X32-LABEL: splat_concat4: 976*9880d681SAndroid Build Coastguard Worker; X32: ## BB#0: 977*9880d681SAndroid Build Coastguard Worker; X32-NEXT: vbroadcastsd {{[0-9]+}}(%esp), %ymm0 978*9880d681SAndroid Build Coastguard Worker; X32-NEXT: retl 979*9880d681SAndroid Build Coastguard Worker; 980*9880d681SAndroid Build Coastguard Worker; X64-LABEL: splat_concat4: 981*9880d681SAndroid Build Coastguard Worker; X64: ## BB#0: 982*9880d681SAndroid Build Coastguard Worker; X64-NEXT: vbroadcastsd %xmm0, %ymm0 983*9880d681SAndroid Build Coastguard Worker; X64-NEXT: retq 984*9880d681SAndroid Build Coastguard Worker %1 = insertelement <2 x double> undef, double %d, i32 0 985*9880d681SAndroid Build Coastguard Worker %2 = insertelement <2 x double> %1, double %d, i32 1 986*9880d681SAndroid Build Coastguard Worker %3 = insertelement <2 x double> undef, double %d, i32 0 987*9880d681SAndroid Build Coastguard Worker %4 = insertelement <2 x double> %3, double %d, i32 1 988*9880d681SAndroid Build Coastguard Worker %5 = shufflevector <2 x double> %2, <2 x double> %4, <4 x i32> <i32 0, i32 1, i32 2, i32 3> 989*9880d681SAndroid Build Coastguard Worker ret <4 x double> %5 990*9880d681SAndroid Build Coastguard Worker} 991*9880d681SAndroid Build Coastguard Worker 992*9880d681SAndroid Build Coastguard Worker; Test cases for <rdar://problem/16074331>. 993*9880d681SAndroid Build Coastguard Worker; Instruction selection for broacast instruction fails if 994*9880d681SAndroid Build Coastguard Worker; the load cannot be folded into the broadcast. 995*9880d681SAndroid Build Coastguard Worker; This happens if the load has initial one use but other uses are 996*9880d681SAndroid Build Coastguard Worker; created later, or if selection DAG cannot prove that folding the 997*9880d681SAndroid Build Coastguard Worker; load will not create a cycle in the DAG. 998*9880d681SAndroid Build Coastguard Worker; Those test cases exerce the latter. 999*9880d681SAndroid Build Coastguard Worker 1000*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: isel_crash_16b 1001*9880d681SAndroid Build Coastguard Worker; CHECK: vpbroadcastb {{[^,]+}}, %xmm{{[0-9]+}} 1002*9880d681SAndroid Build Coastguard Worker; CHECK: ret 1003*9880d681SAndroid Build Coastguard Workerdefine void @isel_crash_16b(i8* %cV_R.addr) { 1004*9880d681SAndroid Build Coastguard Workereintry: 1005*9880d681SAndroid Build Coastguard Worker %__a.addr.i = alloca <2 x i64>, align 16 1006*9880d681SAndroid Build Coastguard Worker %__b.addr.i = alloca <2 x i64>, align 16 1007*9880d681SAndroid Build Coastguard Worker %vCr = alloca <2 x i64>, align 16 1008*9880d681SAndroid Build Coastguard Worker store <2 x i64> zeroinitializer, <2 x i64>* %vCr, align 16 1009*9880d681SAndroid Build Coastguard Worker %tmp = load <2 x i64>, <2 x i64>* %vCr, align 16 1010*9880d681SAndroid Build Coastguard Worker %tmp2 = load i8, i8* %cV_R.addr, align 4 1011*9880d681SAndroid Build Coastguard Worker %splat.splatinsert = insertelement <16 x i8> undef, i8 %tmp2, i32 0 1012*9880d681SAndroid Build Coastguard Worker %splat.splat = shufflevector <16 x i8> %splat.splatinsert, <16 x i8> undef, <16 x i32> zeroinitializer 1013*9880d681SAndroid Build Coastguard Worker %tmp3 = bitcast <16 x i8> %splat.splat to <2 x i64> 1014*9880d681SAndroid Build Coastguard Worker store <2 x i64> %tmp, <2 x i64>* %__a.addr.i, align 16 1015*9880d681SAndroid Build Coastguard Worker store <2 x i64> %tmp3, <2 x i64>* %__b.addr.i, align 16 1016*9880d681SAndroid Build Coastguard Worker ret void 1017*9880d681SAndroid Build Coastguard Worker} 1018*9880d681SAndroid Build Coastguard Worker 1019*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: isel_crash_32b 1020*9880d681SAndroid Build Coastguard Worker; CHECK: vpbroadcastb {{[^,]+}}, %ymm{{[0-9]+}} 1021*9880d681SAndroid Build Coastguard Worker; CHECK: ret 1022*9880d681SAndroid Build Coastguard Workerdefine void @isel_crash_32b(i8* %cV_R.addr) { 1023*9880d681SAndroid Build Coastguard Workereintry: 1024*9880d681SAndroid Build Coastguard Worker %__a.addr.i = alloca <4 x i64>, align 16 1025*9880d681SAndroid Build Coastguard Worker %__b.addr.i = alloca <4 x i64>, align 16 1026*9880d681SAndroid Build Coastguard Worker %vCr = alloca <4 x i64>, align 16 1027*9880d681SAndroid Build Coastguard Worker store <4 x i64> zeroinitializer, <4 x i64>* %vCr, align 16 1028*9880d681SAndroid Build Coastguard Worker %tmp = load <4 x i64>, <4 x i64>* %vCr, align 16 1029*9880d681SAndroid Build Coastguard Worker %tmp2 = load i8, i8* %cV_R.addr, align 4 1030*9880d681SAndroid Build Coastguard Worker %splat.splatinsert = insertelement <32 x i8> undef, i8 %tmp2, i32 0 1031*9880d681SAndroid Build Coastguard Worker %splat.splat = shufflevector <32 x i8> %splat.splatinsert, <32 x i8> undef, <32 x i32> zeroinitializer 1032*9880d681SAndroid Build Coastguard Worker %tmp3 = bitcast <32 x i8> %splat.splat to <4 x i64> 1033*9880d681SAndroid Build Coastguard Worker store <4 x i64> %tmp, <4 x i64>* %__a.addr.i, align 16 1034*9880d681SAndroid Build Coastguard Worker store <4 x i64> %tmp3, <4 x i64>* %__b.addr.i, align 16 1035*9880d681SAndroid Build Coastguard Worker ret void 1036*9880d681SAndroid Build Coastguard Worker} 1037*9880d681SAndroid Build Coastguard Worker 1038*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: isel_crash_8w 1039*9880d681SAndroid Build Coastguard Worker; CHECK: vpbroadcastw {{[^,]+}}, %xmm{{[0-9]+}} 1040*9880d681SAndroid Build Coastguard Worker; CHECK: ret 1041*9880d681SAndroid Build Coastguard Workerdefine void @isel_crash_8w(i16* %cV_R.addr) { 1042*9880d681SAndroid Build Coastguard Workerentry: 1043*9880d681SAndroid Build Coastguard Worker %__a.addr.i = alloca <2 x i64>, align 16 1044*9880d681SAndroid Build Coastguard Worker %__b.addr.i = alloca <2 x i64>, align 16 1045*9880d681SAndroid Build Coastguard Worker %vCr = alloca <2 x i64>, align 16 1046*9880d681SAndroid Build Coastguard Worker store <2 x i64> zeroinitializer, <2 x i64>* %vCr, align 16 1047*9880d681SAndroid Build Coastguard Worker %tmp = load <2 x i64>, <2 x i64>* %vCr, align 16 1048*9880d681SAndroid Build Coastguard Worker %tmp2 = load i16, i16* %cV_R.addr, align 4 1049*9880d681SAndroid Build Coastguard Worker %splat.splatinsert = insertelement <8 x i16> undef, i16 %tmp2, i32 0 1050*9880d681SAndroid Build Coastguard Worker %splat.splat = shufflevector <8 x i16> %splat.splatinsert, <8 x i16> undef, <8 x i32> zeroinitializer 1051*9880d681SAndroid Build Coastguard Worker %tmp3 = bitcast <8 x i16> %splat.splat to <2 x i64> 1052*9880d681SAndroid Build Coastguard Worker store <2 x i64> %tmp, <2 x i64>* %__a.addr.i, align 16 1053*9880d681SAndroid Build Coastguard Worker store <2 x i64> %tmp3, <2 x i64>* %__b.addr.i, align 16 1054*9880d681SAndroid Build Coastguard Worker ret void 1055*9880d681SAndroid Build Coastguard Worker} 1056*9880d681SAndroid Build Coastguard Worker 1057*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: isel_crash_16w 1058*9880d681SAndroid Build Coastguard Worker; CHECK: vpbroadcastw {{[^,]+}}, %ymm{{[0-9]+}} 1059*9880d681SAndroid Build Coastguard Worker; CHECK: ret 1060*9880d681SAndroid Build Coastguard Workerdefine void @isel_crash_16w(i16* %cV_R.addr) { 1061*9880d681SAndroid Build Coastguard Workereintry: 1062*9880d681SAndroid Build Coastguard Worker %__a.addr.i = alloca <4 x i64>, align 16 1063*9880d681SAndroid Build Coastguard Worker %__b.addr.i = alloca <4 x i64>, align 16 1064*9880d681SAndroid Build Coastguard Worker %vCr = alloca <4 x i64>, align 16 1065*9880d681SAndroid Build Coastguard Worker store <4 x i64> zeroinitializer, <4 x i64>* %vCr, align 16 1066*9880d681SAndroid Build Coastguard Worker %tmp = load <4 x i64>, <4 x i64>* %vCr, align 16 1067*9880d681SAndroid Build Coastguard Worker %tmp2 = load i16, i16* %cV_R.addr, align 4 1068*9880d681SAndroid Build Coastguard Worker %splat.splatinsert = insertelement <16 x i16> undef, i16 %tmp2, i32 0 1069*9880d681SAndroid Build Coastguard Worker %splat.splat = shufflevector <16 x i16> %splat.splatinsert, <16 x i16> undef, <16 x i32> zeroinitializer 1070*9880d681SAndroid Build Coastguard Worker %tmp3 = bitcast <16 x i16> %splat.splat to <4 x i64> 1071*9880d681SAndroid Build Coastguard Worker store <4 x i64> %tmp, <4 x i64>* %__a.addr.i, align 16 1072*9880d681SAndroid Build Coastguard Worker store <4 x i64> %tmp3, <4 x i64>* %__b.addr.i, align 16 1073*9880d681SAndroid Build Coastguard Worker ret void 1074*9880d681SAndroid Build Coastguard Worker} 1075*9880d681SAndroid Build Coastguard Worker 1076*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: isel_crash_4d 1077*9880d681SAndroid Build Coastguard Worker; CHECK: vbroadcastss {{[^,]+}}, %xmm{{[0-9]+}} 1078*9880d681SAndroid Build Coastguard Worker; CHECK: ret 1079*9880d681SAndroid Build Coastguard Workerdefine void @isel_crash_4d(i32* %cV_R.addr) { 1080*9880d681SAndroid Build Coastguard Workerentry: 1081*9880d681SAndroid Build Coastguard Worker %__a.addr.i = alloca <2 x i64>, align 16 1082*9880d681SAndroid Build Coastguard Worker %__b.addr.i = alloca <2 x i64>, align 16 1083*9880d681SAndroid Build Coastguard Worker %vCr = alloca <2 x i64>, align 16 1084*9880d681SAndroid Build Coastguard Worker store <2 x i64> zeroinitializer, <2 x i64>* %vCr, align 16 1085*9880d681SAndroid Build Coastguard Worker %tmp = load <2 x i64>, <2 x i64>* %vCr, align 16 1086*9880d681SAndroid Build Coastguard Worker %tmp2 = load i32, i32* %cV_R.addr, align 4 1087*9880d681SAndroid Build Coastguard Worker %splat.splatinsert = insertelement <4 x i32> undef, i32 %tmp2, i32 0 1088*9880d681SAndroid Build Coastguard Worker %splat.splat = shufflevector <4 x i32> %splat.splatinsert, <4 x i32> undef, <4 x i32> zeroinitializer 1089*9880d681SAndroid Build Coastguard Worker %tmp3 = bitcast <4 x i32> %splat.splat to <2 x i64> 1090*9880d681SAndroid Build Coastguard Worker store <2 x i64> %tmp, <2 x i64>* %__a.addr.i, align 16 1091*9880d681SAndroid Build Coastguard Worker store <2 x i64> %tmp3, <2 x i64>* %__b.addr.i, align 16 1092*9880d681SAndroid Build Coastguard Worker ret void 1093*9880d681SAndroid Build Coastguard Worker} 1094*9880d681SAndroid Build Coastguard Worker 1095*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: isel_crash_8d 1096*9880d681SAndroid Build Coastguard Worker; CHECK: vbroadcastss {{[^,]+}}, %ymm{{[0-9]+}} 1097*9880d681SAndroid Build Coastguard Worker; CHECK: ret 1098*9880d681SAndroid Build Coastguard Workerdefine void @isel_crash_8d(i32* %cV_R.addr) { 1099*9880d681SAndroid Build Coastguard Workereintry: 1100*9880d681SAndroid Build Coastguard Worker %__a.addr.i = alloca <4 x i64>, align 16 1101*9880d681SAndroid Build Coastguard Worker %__b.addr.i = alloca <4 x i64>, align 16 1102*9880d681SAndroid Build Coastguard Worker %vCr = alloca <4 x i64>, align 16 1103*9880d681SAndroid Build Coastguard Worker store <4 x i64> zeroinitializer, <4 x i64>* %vCr, align 16 1104*9880d681SAndroid Build Coastguard Worker %tmp = load <4 x i64>, <4 x i64>* %vCr, align 16 1105*9880d681SAndroid Build Coastguard Worker %tmp2 = load i32, i32* %cV_R.addr, align 4 1106*9880d681SAndroid Build Coastguard Worker %splat.splatinsert = insertelement <8 x i32> undef, i32 %tmp2, i32 0 1107*9880d681SAndroid Build Coastguard Worker %splat.splat = shufflevector <8 x i32> %splat.splatinsert, <8 x i32> undef, <8 x i32> zeroinitializer 1108*9880d681SAndroid Build Coastguard Worker %tmp3 = bitcast <8 x i32> %splat.splat to <4 x i64> 1109*9880d681SAndroid Build Coastguard Worker store <4 x i64> %tmp, <4 x i64>* %__a.addr.i, align 16 1110*9880d681SAndroid Build Coastguard Worker store <4 x i64> %tmp3, <4 x i64>* %__b.addr.i, align 16 1111*9880d681SAndroid Build Coastguard Worker ret void 1112*9880d681SAndroid Build Coastguard Worker} 1113*9880d681SAndroid Build Coastguard Worker 1114*9880d681SAndroid Build Coastguard Worker; X64-LABEL: isel_crash_2q 1115*9880d681SAndroid Build Coastguard Worker; X64: vpbroadcastq {{[^,]+}}, %xmm{{[0-9]+}} 1116*9880d681SAndroid Build Coastguard Worker; X64: ret 1117*9880d681SAndroid Build Coastguard Workerdefine void @isel_crash_2q(i64* %cV_R.addr) { 1118*9880d681SAndroid Build Coastguard Workerentry: 1119*9880d681SAndroid Build Coastguard Worker %__a.addr.i = alloca <2 x i64>, align 16 1120*9880d681SAndroid Build Coastguard Worker %__b.addr.i = alloca <2 x i64>, align 16 1121*9880d681SAndroid Build Coastguard Worker %vCr = alloca <2 x i64>, align 16 1122*9880d681SAndroid Build Coastguard Worker store <2 x i64> zeroinitializer, <2 x i64>* %vCr, align 16 1123*9880d681SAndroid Build Coastguard Worker %tmp = load <2 x i64>, <2 x i64>* %vCr, align 16 1124*9880d681SAndroid Build Coastguard Worker %tmp2 = load i64, i64* %cV_R.addr, align 4 1125*9880d681SAndroid Build Coastguard Worker %splat.splatinsert = insertelement <2 x i64> undef, i64 %tmp2, i32 0 1126*9880d681SAndroid Build Coastguard Worker %splat.splat = shufflevector <2 x i64> %splat.splatinsert, <2 x i64> undef, <2 x i32> zeroinitializer 1127*9880d681SAndroid Build Coastguard Worker store <2 x i64> %tmp, <2 x i64>* %__a.addr.i, align 16 1128*9880d681SAndroid Build Coastguard Worker store <2 x i64> %splat.splat, <2 x i64>* %__b.addr.i, align 16 1129*9880d681SAndroid Build Coastguard Worker ret void 1130*9880d681SAndroid Build Coastguard Worker} 1131*9880d681SAndroid Build Coastguard Worker 1132*9880d681SAndroid Build Coastguard Worker; X64-LABEL: isel_crash_4q 1133*9880d681SAndroid Build Coastguard Worker; X64: vbroadcastsd {{[^,]+}}, %ymm{{[0-9]+}} 1134*9880d681SAndroid Build Coastguard Worker; X64: ret 1135*9880d681SAndroid Build Coastguard Workerdefine void @isel_crash_4q(i64* %cV_R.addr) { 1136*9880d681SAndroid Build Coastguard Workereintry: 1137*9880d681SAndroid Build Coastguard Worker %__a.addr.i = alloca <4 x i64>, align 16 1138*9880d681SAndroid Build Coastguard Worker %__b.addr.i = alloca <4 x i64>, align 16 1139*9880d681SAndroid Build Coastguard Worker %vCr = alloca <4 x i64>, align 16 1140*9880d681SAndroid Build Coastguard Worker store <4 x i64> zeroinitializer, <4 x i64>* %vCr, align 16 1141*9880d681SAndroid Build Coastguard Worker %tmp = load <4 x i64>, <4 x i64>* %vCr, align 16 1142*9880d681SAndroid Build Coastguard Worker %tmp2 = load i64, i64* %cV_R.addr, align 4 1143*9880d681SAndroid Build Coastguard Worker %splat.splatinsert = insertelement <4 x i64> undef, i64 %tmp2, i32 0 1144*9880d681SAndroid Build Coastguard Worker %splat.splat = shufflevector <4 x i64> %splat.splatinsert, <4 x i64> undef, <4 x i32> zeroinitializer 1145*9880d681SAndroid Build Coastguard Worker store <4 x i64> %tmp, <4 x i64>* %__a.addr.i, align 16 1146*9880d681SAndroid Build Coastguard Worker store <4 x i64> %splat.splat, <4 x i64>* %__b.addr.i, align 16 1147*9880d681SAndroid Build Coastguard Worker ret void 1148*9880d681SAndroid Build Coastguard Worker} 1149