650 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mtriple=aarch64--linux-gnu | FileCheck %s3 4define i32 @v1(ptr nocapture noundef readonly %p1, i32 noundef %i1, ptr nocapture noundef readonly %p2, i32 noundef %i2) {5; CHECK-LABEL: v1:6; CHECK: // %bb.0: // %entry7; CHECK-NEXT: // kill: def $w1 killed $w1 def $x18; CHECK-NEXT: sxtw x8, w19; CHECK-NEXT: // kill: def $w3 killed $w3 def $x310; CHECK-NEXT: sxtw x9, w311; CHECK-NEXT: ldr d0, [x0]12; CHECK-NEXT: ldr d5, [x2]13; CHECK-NEXT: add x10, x0, x814; CHECK-NEXT: add x11, x2, x915; CHECK-NEXT: add x12, x10, x816; CHECK-NEXT: ldr d6, [x10]17; CHECK-NEXT: ldr d7, [x11]18; CHECK-NEXT: ldr d1, [x12, x8]19; CHECK-NEXT: add x8, x11, x920; CHECK-NEXT: ldr d2, [x12]21; CHECK-NEXT: ldr d3, [x8, x9]22; CHECK-NEXT: ldr d4, [x8]23; CHECK-NEXT: usubl v0.8h, v0.8b, v5.8b24; CHECK-NEXT: usubl v2.8h, v2.8b, v4.8b25; CHECK-NEXT: usubl v1.8h, v1.8b, v3.8b26; CHECK-NEXT: usubl v3.8h, v6.8b, v7.8b27; CHECK-NEXT: shll2 v6.4s, v0.8h, #1628; CHECK-NEXT: shll2 v4.4s, v1.8h, #1629; CHECK-NEXT: shll2 v5.4s, v2.8h, #1630; CHECK-NEXT: shll2 v7.4s, v3.8h, #1631; CHECK-NEXT: saddw v0.4s, v6.4s, v0.4h32; CHECK-NEXT: saddw v1.4s, v4.4s, v1.4h33; CHECK-NEXT: saddw v2.4s, v5.4s, v2.4h34; CHECK-NEXT: saddw v3.4s, v7.4s, v3.4h35; CHECK-NEXT: uzp2 v4.4s, v1.4s, v2.4s36; CHECK-NEXT: zip1 v5.4s, v3.4s, v0.4s37; CHECK-NEXT: trn1 v6.4s, v3.4s, v0.4s38; CHECK-NEXT: zip2 v0.4s, v3.4s, v0.4s39; CHECK-NEXT: ext v16.16b, v1.16b, v1.16b, #1240; CHECK-NEXT: zip2 v17.4s, v1.4s, v2.4s41; CHECK-NEXT: zip2 v7.4s, v2.4s, v1.4s42; CHECK-NEXT: zip1 v18.4s, v2.4s, v1.4s43; CHECK-NEXT: uzp2 v4.4s, v4.4s, v1.4s44; CHECK-NEXT: ext v3.16b, v3.16b, v5.16b, #845; CHECK-NEXT: mov v1.s[0], v2.s[1]46; CHECK-NEXT: ext v2.16b, v2.16b, v16.16b, #1247; CHECK-NEXT: mov v17.d[1], v6.d[1]48; CHECK-NEXT: mov v7.d[1], v6.d[1]49; CHECK-NEXT: mov v4.d[1], v0.d[1]50; CHECK-NEXT: mov v18.d[1], v3.d[1]51; CHECK-NEXT: mov v1.d[1], v5.d[1]52; CHECK-NEXT: mov v2.d[1], v0.d[1]53; CHECK-NEXT: add v0.4s, v4.4s, v17.4s54; CHECK-NEXT: add v3.4s, v1.4s, v18.4s55; CHECK-NEXT: sub v1.4s, v18.4s, v1.4s56; CHECK-NEXT: sub v2.4s, v7.4s, v2.4s57; CHECK-NEXT: rev64 v4.4s, v0.4s58; CHECK-NEXT: rev64 v5.4s, v3.4s59; CHECK-NEXT: sub v6.4s, v1.4s, v2.4s60; CHECK-NEXT: add v1.4s, v2.4s, v1.4s61; CHECK-NEXT: mov v4.d[1], v0.d[1]62; CHECK-NEXT: mov v5.d[1], v3.d[1]63; CHECK-NEXT: rev64 v2.4s, v6.4s64; CHECK-NEXT: rev64 v7.4s, v1.4s65; CHECK-NEXT: sub v3.4s, v3.4s, v4.4s66; CHECK-NEXT: add v0.4s, v0.4s, v5.4s67; CHECK-NEXT: sub v2.4s, v6.4s, v2.4s68; CHECK-NEXT: sub v5.4s, v1.4s, v7.4s69; CHECK-NEXT: addp v4.4s, v3.4s, v6.4s70; CHECK-NEXT: addp v1.4s, v0.4s, v1.4s71; CHECK-NEXT: rev64 v6.4s, v0.4s72; CHECK-NEXT: rev64 v7.4s, v3.4s73; CHECK-NEXT: ext v16.16b, v4.16b, v2.16b, #474; CHECK-NEXT: ext v17.16b, v1.16b, v5.16b, #475; CHECK-NEXT: sub v0.4s, v0.4s, v6.4s76; CHECK-NEXT: sub v3.4s, v3.4s, v7.4s77; CHECK-NEXT: mov v7.16b, v2.16b78; CHECK-NEXT: zip2 v6.4s, v16.4s, v4.4s79; CHECK-NEXT: mov v16.16b, v5.16b80; CHECK-NEXT: zip2 v17.4s, v17.4s, v1.4s81; CHECK-NEXT: ext v18.16b, v0.16b, v1.16b, #482; CHECK-NEXT: mov v7.s[2], v4.s[3]83; CHECK-NEXT: mov v21.16b, v3.16b84; CHECK-NEXT: mov v16.s[2], v1.s[3]85; CHECK-NEXT: ext v5.16b, v5.16b, v17.16b, #1286; CHECK-NEXT: zip1 v17.4s, v1.4s, v1.4s87; CHECK-NEXT: ext v2.16b, v2.16b, v6.16b, #1288; CHECK-NEXT: ext v18.16b, v18.16b, v18.16b, #489; CHECK-NEXT: mov v19.16b, v7.16b90; CHECK-NEXT: ext v6.16b, v3.16b, v4.16b, #891; CHECK-NEXT: mov v21.s[2], v4.s[1]92; CHECK-NEXT: mov v20.16b, v16.16b93; CHECK-NEXT: mov v19.s[1], v4.s[2]94; CHECK-NEXT: trn2 v0.4s, v17.4s, v0.4s95; CHECK-NEXT: sub v16.4s, v16.4s, v5.4s96; CHECK-NEXT: mov v17.16b, v18.16b97; CHECK-NEXT: ext v3.16b, v6.16b, v3.16b, #498; CHECK-NEXT: sub v7.4s, v7.4s, v2.4s99; CHECK-NEXT: mov v20.s[1], v1.s[2]100; CHECK-NEXT: mov v17.s[0], v1.s[1]101; CHECK-NEXT: mov v1.16b, v21.16b102; CHECK-NEXT: add v2.4s, v19.4s, v2.4s103; CHECK-NEXT: uzp2 v3.4s, v6.4s, v3.4s104; CHECK-NEXT: add v5.4s, v20.4s, v5.4s105; CHECK-NEXT: mov v1.s[1], v4.s[0]106; CHECK-NEXT: sub v4.4s, v0.4s, v18.4s107; CHECK-NEXT: mov v2.d[1], v7.d[1]108; CHECK-NEXT: add v0.4s, v0.4s, v17.4s109; CHECK-NEXT: mov v5.d[1], v16.d[1]110; CHECK-NEXT: sub v6.4s, v21.4s, v3.4s111; CHECK-NEXT: add v1.4s, v1.4s, v3.4s112; CHECK-NEXT: mov v0.d[1], v4.d[1]113; CHECK-NEXT: cmlt v4.8h, v2.8h, #0114; CHECK-NEXT: cmlt v3.8h, v5.8h, #0115; CHECK-NEXT: mov v1.d[1], v6.d[1]116; CHECK-NEXT: add v2.4s, v4.4s, v2.4s117; CHECK-NEXT: cmlt v6.8h, v0.8h, #0118; CHECK-NEXT: add v5.4s, v3.4s, v5.4s119; CHECK-NEXT: eor v2.16b, v2.16b, v4.16b120; CHECK-NEXT: cmlt v7.8h, v1.8h, #0121; CHECK-NEXT: add v0.4s, v6.4s, v0.4s122; CHECK-NEXT: eor v3.16b, v5.16b, v3.16b123; CHECK-NEXT: add v1.4s, v7.4s, v1.4s124; CHECK-NEXT: eor v0.16b, v0.16b, v6.16b125; CHECK-NEXT: add v2.4s, v3.4s, v2.4s126; CHECK-NEXT: eor v1.16b, v1.16b, v7.16b127; CHECK-NEXT: add v0.4s, v0.4s, v2.4s128; CHECK-NEXT: add v0.4s, v0.4s, v1.4s129; CHECK-NEXT: addv s0, v0.4s130; CHECK-NEXT: fmov w8, s0131; CHECK-NEXT: lsr w9, w8, #16132; CHECK-NEXT: add w8, w9, w8, uxth133; CHECK-NEXT: lsr w0, w8, #1134; CHECK-NEXT: ret135entry:136 %idx.ext = sext i32 %i1 to i64137 %idx.ext63 = sext i32 %i2 to i64138 %arrayidx3 = getelementptr inbounds i8, ptr %p1, i64 4139 %arrayidx5 = getelementptr inbounds i8, ptr %p2, i64 4140 %0 = load <4 x i8>, ptr %p1, align 1141 %1 = load <4 x i8>, ptr %p2, align 1142 %add.ptr = getelementptr inbounds i8, ptr %p1, i64 %idx.ext143 %add.ptr64 = getelementptr inbounds i8, ptr %p2, i64 %idx.ext63144 %arrayidx3.1 = getelementptr inbounds i8, ptr %add.ptr, i64 4145 %arrayidx5.1 = getelementptr inbounds i8, ptr %add.ptr64, i64 4146 %2 = load <4 x i8>, ptr %add.ptr, align 1147 %3 = load <4 x i8>, ptr %add.ptr64, align 1148 %add.ptr.1 = getelementptr inbounds i8, ptr %add.ptr, i64 %idx.ext149 %add.ptr64.1 = getelementptr inbounds i8, ptr %add.ptr64, i64 %idx.ext63150 %arrayidx3.2 = getelementptr inbounds i8, ptr %add.ptr.1, i64 4151 %arrayidx5.2 = getelementptr inbounds i8, ptr %add.ptr64.1, i64 4152 %4 = load <4 x i8>, ptr %add.ptr.1, align 1153 %5 = load <4 x i8>, ptr %add.ptr64.1, align 1154 %add.ptr.2 = getelementptr inbounds i8, ptr %add.ptr.1, i64 %idx.ext155 %add.ptr64.2 = getelementptr inbounds i8, ptr %add.ptr64.1, i64 %idx.ext63156 %arrayidx3.3 = getelementptr inbounds i8, ptr %add.ptr.2, i64 4157 %arrayidx5.3 = getelementptr inbounds i8, ptr %add.ptr64.2, i64 4158 %6 = load <4 x i8>, ptr %add.ptr.2, align 1159 %7 = load <4 x i8>, ptr %add.ptr64.2, align 1160 %8 = load <4 x i8>, ptr %arrayidx3, align 1161 %9 = load <4 x i8>, ptr %arrayidx3.1, align 1162 %10 = load <4 x i8>, ptr %arrayidx3.2, align 1163 %11 = load <4 x i8>, ptr %arrayidx3.3, align 1164 %12 = shufflevector <4 x i8> %11, <4 x i8> %10, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>165 %13 = shufflevector <4 x i8> %9, <4 x i8> poison, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>166 %14 = shufflevector <16 x i8> %12, <16 x i8> %13, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 16, i32 17, i32 18, i32 19, i32 undef, i32 undef, i32 undef, i32 undef>167 %15 = shufflevector <4 x i8> %8, <4 x i8> poison, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>168 %16 = shufflevector <16 x i8> %14, <16 x i8> %15, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 16, i32 17, i32 18, i32 19>169 %17 = zext <16 x i8> %16 to <16 x i32>170 %18 = load <4 x i8>, ptr %arrayidx5, align 1171 %19 = load <4 x i8>, ptr %arrayidx5.1, align 1172 %20 = load <4 x i8>, ptr %arrayidx5.2, align 1173 %21 = load <4 x i8>, ptr %arrayidx5.3, align 1174 %22 = shufflevector <4 x i8> %21, <4 x i8> %20, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>175 %23 = shufflevector <4 x i8> %19, <4 x i8> poison, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>176 %24 = shufflevector <16 x i8> %22, <16 x i8> %23, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 16, i32 17, i32 18, i32 19, i32 undef, i32 undef, i32 undef, i32 undef>177 %25 = shufflevector <4 x i8> %18, <4 x i8> poison, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>178 %26 = shufflevector <16 x i8> %24, <16 x i8> %25, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 16, i32 17, i32 18, i32 19>179 %27 = zext <16 x i8> %26 to <16 x i32>180 %28 = shufflevector <4 x i8> %6, <4 x i8> %4, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>181 %29 = shufflevector <4 x i8> %2, <4 x i8> poison, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>182 %30 = shufflevector <16 x i8> %28, <16 x i8> %29, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 16, i32 17, i32 18, i32 19, i32 undef, i32 undef, i32 undef, i32 undef>183 %31 = shufflevector <4 x i8> %0, <4 x i8> poison, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>184 %32 = shufflevector <16 x i8> %30, <16 x i8> %31, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 16, i32 17, i32 18, i32 19>185 %33 = zext <16 x i8> %32 to <16 x i32>186 %34 = shufflevector <4 x i8> %7, <4 x i8> %5, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>187 %35 = shufflevector <4 x i8> %3, <4 x i8> poison, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>188 %36 = shufflevector <16 x i8> %34, <16 x i8> %35, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 16, i32 17, i32 18, i32 19, i32 undef, i32 undef, i32 undef, i32 undef>189 %37 = shufflevector <4 x i8> %1, <4 x i8> poison, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>190 %38 = shufflevector <16 x i8> %36, <16 x i8> %37, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 16, i32 17, i32 18, i32 19>191 %39 = zext <16 x i8> %38 to <16 x i32>192 %40 = sub nsw <16 x i32> %33, %39193 %41 = sub nsw <16 x i32> %17, %27194 %42 = shl nsw <16 x i32> %41, <i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16>195 %43 = add nsw <16 x i32> %42, %40196 %44 = shufflevector <16 x i32> %43, <16 x i32> poison, <16 x i32> <i32 3, i32 7, i32 11, i32 15, i32 6, i32 2, i32 10, i32 14, i32 5, i32 1, i32 9, i32 13, i32 4, i32 0, i32 8, i32 12>197 %45 = shufflevector <16 x i32> %43, <16 x i32> undef, <16 x i32> <i32 2, i32 6, i32 10, i32 14, i32 7, i32 3, i32 11, i32 15, i32 4, i32 0, i32 8, i32 12, i32 5, i32 1, i32 9, i32 13>198 %46 = add nsw <16 x i32> %44, %45199 %47 = sub nsw <16 x i32> %44, %45200 %48 = shufflevector <16 x i32> %46, <16 x i32> %47, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 20, i32 21, i32 22, i32 23, i32 8, i32 9, i32 10, i32 11, i32 28, i32 29, i32 30, i32 31>201 %49 = shufflevector <16 x i32> %46, <16 x i32> %47, <16 x i32> <i32 9, i32 8, i32 10, i32 11, i32 28, i32 29, i32 30, i32 31, i32 1, i32 0, i32 2, i32 3, i32 20, i32 21, i32 22, i32 23>202 %50 = add nsw <16 x i32> %48, %49203 %51 = sub nsw <16 x i32> %48, %49204 %52 = shufflevector <16 x i32> %50, <16 x i32> %51, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31>205 %53 = shufflevector <16 x i32> %50, <16 x i32> %51, <16 x i32> <i32 1, i32 0, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6, i32 25, i32 24, i32 27, i32 26, i32 29, i32 28, i32 31, i32 30>206 %54 = add nsw <16 x i32> %52, %53207 %55 = sub nsw <16 x i32> %52, %53208 %56 = shufflevector <16 x i32> %54, <16 x i32> %55, <16 x i32> <i32 0, i32 17, i32 2, i32 19, i32 20, i32 5, i32 6, i32 23, i32 24, i32 9, i32 10, i32 27, i32 28, i32 13, i32 14, i32 31>209 %57 = shufflevector <16 x i32> %54, <16 x i32> %55, <16 x i32> <i32 2, i32 19, i32 0, i32 17, i32 23, i32 6, i32 5, i32 20, i32 27, i32 10, i32 9, i32 24, i32 31, i32 14, i32 13, i32 28>210 %58 = add nsw <16 x i32> %56, %57211 %59 = sub nsw <16 x i32> %56, %57212 %60 = shufflevector <16 x i32> %58, <16 x i32> %59, <16 x i32> <i32 0, i32 1, i32 18, i32 19, i32 4, i32 5, i32 22, i32 23, i32 8, i32 9, i32 26, i32 27, i32 12, i32 13, i32 30, i32 31>213 %61 = lshr <16 x i32> %60, <i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15>214 %62 = and <16 x i32> %61, <i32 65537, i32 65537, i32 65537, i32 65537, i32 65537, i32 65537, i32 65537, i32 65537, i32 65537, i32 65537, i32 65537, i32 65537, i32 65537, i32 65537, i32 65537, i32 65537>215 %63 = mul nuw <16 x i32> %62, <i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535>216 %64 = add <16 x i32> %63, %60217 %65 = xor <16 x i32> %64, %63218 %66 = call i32 @llvm.vector.reduce.add.v16i32(<16 x i32> %65)219 %conv118 = and i32 %66, 65535220 %shr = lshr i32 %66, 16221 %add119 = add nuw nsw i32 %conv118, %shr222 %shr120 = lshr i32 %add119, 1223 ret i32 %shr120224}225 226define i32 @v2(ptr nocapture noundef readonly %p1, i32 noundef %i1, ptr nocapture noundef readonly %p2, i32 noundef %i2) {227; CHECK-LABEL: v2:228; CHECK: // %bb.0: // %entry229; CHECK-NEXT: // kill: def $w3 killed $w3 def $x3230; CHECK-NEXT: // kill: def $w1 killed $w1 def $x1231; CHECK-NEXT: sxtw x8, w1232; CHECK-NEXT: sxtw x9, w3233; CHECK-NEXT: ldr d0, [x0]234; CHECK-NEXT: ldr d1, [x2]235; CHECK-NEXT: add x10, x0, x8236; CHECK-NEXT: add x11, x2, x9237; CHECK-NEXT: ldr d2, [x10]238; CHECK-NEXT: add x10, x10, x8239; CHECK-NEXT: ldr d3, [x11]240; CHECK-NEXT: add x11, x11, x9241; CHECK-NEXT: ldr d4, [x10]242; CHECK-NEXT: ldr d6, [x10, x8]243; CHECK-NEXT: ldr d5, [x11]244; CHECK-NEXT: ldr d7, [x11, x9]245; CHECK-NEXT: usubl v0.8h, v0.8b, v1.8b246; CHECK-NEXT: usubl v1.8h, v2.8b, v3.8b247; CHECK-NEXT: usubl v2.8h, v4.8b, v5.8b248; CHECK-NEXT: usubl v3.8h, v6.8b, v7.8b249; CHECK-NEXT: shll2 v4.4s, v0.8h, #16250; CHECK-NEXT: shll2 v5.4s, v1.8h, #16251; CHECK-NEXT: shll2 v6.4s, v3.8h, #16252; CHECK-NEXT: shll2 v7.4s, v2.8h, #16253; CHECK-NEXT: saddw v0.4s, v4.4s, v0.4h254; CHECK-NEXT: saddw v1.4s, v5.4s, v1.4h255; CHECK-NEXT: saddw v3.4s, v6.4s, v3.4h256; CHECK-NEXT: saddw v2.4s, v7.4s, v2.4h257; CHECK-NEXT: zip1 v4.4s, v1.4s, v0.4s258; CHECK-NEXT: trn1 v18.4s, v1.4s, v0.4s259; CHECK-NEXT: zip2 v0.4s, v1.4s, v0.4s260; CHECK-NEXT: uzp2 v5.4s, v3.4s, v2.4s261; CHECK-NEXT: mov v7.16b, v3.16b262; CHECK-NEXT: zip1 v6.4s, v2.4s, v3.4s263; CHECK-NEXT: zip2 v16.4s, v3.4s, v2.4s264; CHECK-NEXT: ext v17.16b, v1.16b, v4.16b, #8265; CHECK-NEXT: mov v7.s[0], v2.s[1]266; CHECK-NEXT: ext v1.16b, v3.16b, v3.16b, #12267; CHECK-NEXT: uzp2 v5.4s, v5.4s, v3.4s268; CHECK-NEXT: zip2 v3.4s, v2.4s, v3.4s269; CHECK-NEXT: mov v16.d[1], v18.d[1]270; CHECK-NEXT: mov v6.d[1], v17.d[1]271; CHECK-NEXT: mov v7.d[1], v4.d[1]272; CHECK-NEXT: ext v1.16b, v2.16b, v1.16b, #12273; CHECK-NEXT: mov v5.d[1], v0.d[1]274; CHECK-NEXT: mov v3.d[1], v18.d[1]275; CHECK-NEXT: add v2.4s, v7.4s, v6.4s276; CHECK-NEXT: mov v1.d[1], v0.d[1]277; CHECK-NEXT: add v4.4s, v5.4s, v16.4s278; CHECK-NEXT: rev64 v5.4s, v2.4s279; CHECK-NEXT: rev64 v0.4s, v4.4s280; CHECK-NEXT: sub v1.4s, v3.4s, v1.4s281; CHECK-NEXT: sub v3.4s, v6.4s, v7.4s282; CHECK-NEXT: mov v5.d[1], v2.d[1]283; CHECK-NEXT: add v6.4s, v1.4s, v3.4s284; CHECK-NEXT: sub v1.4s, v3.4s, v1.4s285; CHECK-NEXT: mov v0.d[1], v4.d[1]286; CHECK-NEXT: add v4.4s, v4.4s, v5.4s287; CHECK-NEXT: sub v0.4s, v2.4s, v0.4s288; CHECK-NEXT: zip1 v2.4s, v4.4s, v6.4s289; CHECK-NEXT: uzp2 v3.4s, v4.4s, v6.4s290; CHECK-NEXT: zip2 v16.4s, v4.4s, v6.4s291; CHECK-NEXT: zip1 v5.4s, v0.4s, v1.4s292; CHECK-NEXT: trn1 v7.4s, v0.4s, v1.4s293; CHECK-NEXT: zip2 v1.4s, v0.4s, v1.4s294; CHECK-NEXT: trn2 v2.4s, v4.4s, v2.4s295; CHECK-NEXT: uzp2 v3.4s, v3.4s, v4.4s296; CHECK-NEXT: mov v4.s[1], v6.s[1]297; CHECK-NEXT: ext v0.16b, v0.16b, v5.16b, #8298; CHECK-NEXT: mov v16.d[1], v7.d[1]299; CHECK-NEXT: mov v3.d[1], v1.d[1]300; CHECK-NEXT: mov v4.d[1], v5.d[1]301; CHECK-NEXT: mov v2.d[1], v0.d[1]302; CHECK-NEXT: add v0.4s, v16.4s, v3.4s303; CHECK-NEXT: sub v3.4s, v3.4s, v16.4s304; CHECK-NEXT: add v1.4s, v4.4s, v2.4s305; CHECK-NEXT: sub v2.4s, v2.4s, v4.4s306; CHECK-NEXT: ext v4.16b, v0.16b, v0.16b, #4307; CHECK-NEXT: zip2 v6.4s, v0.4s, v3.4s308; CHECK-NEXT: zip2 v7.4s, v3.4s, v0.4s309; CHECK-NEXT: ext v5.16b, v1.16b, v1.16b, #4310; CHECK-NEXT: zip2 v16.4s, v2.4s, v1.4s311; CHECK-NEXT: zip2 v17.4s, v1.4s, v2.4s312; CHECK-NEXT: zip1 v0.4s, v0.4s, v3.4s313; CHECK-NEXT: zip1 v1.4s, v1.4s, v2.4s314; CHECK-NEXT: ext v18.16b, v4.16b, v3.16b, #8315; CHECK-NEXT: ext v19.16b, v5.16b, v2.16b, #8316; CHECK-NEXT: add v2.4s, v16.4s, v7.4s317; CHECK-NEXT: sub v3.4s, v6.4s, v17.4s318; CHECK-NEXT: sub v0.4s, v0.4s, v1.4s319; CHECK-NEXT: ext v4.16b, v18.16b, v4.16b, #4320; CHECK-NEXT: cmlt v1.8h, v3.8h, #0321; CHECK-NEXT: cmlt v6.8h, v2.8h, #0322; CHECK-NEXT: ext v5.16b, v19.16b, v5.16b, #4323; CHECK-NEXT: add v2.4s, v6.4s, v2.4s324; CHECK-NEXT: add v3.4s, v1.4s, v3.4s325; CHECK-NEXT: add v4.4s, v5.4s, v4.4s326; CHECK-NEXT: cmlt v5.8h, v0.8h, #0327; CHECK-NEXT: eor v1.16b, v3.16b, v1.16b328; CHECK-NEXT: eor v2.16b, v2.16b, v6.16b329; CHECK-NEXT: cmlt v7.8h, v4.8h, #0330; CHECK-NEXT: add v0.4s, v5.4s, v0.4s331; CHECK-NEXT: add v1.4s, v2.4s, v1.4s332; CHECK-NEXT: add v3.4s, v7.4s, v4.4s333; CHECK-NEXT: eor v0.16b, v0.16b, v5.16b334; CHECK-NEXT: eor v2.16b, v3.16b, v7.16b335; CHECK-NEXT: add v0.4s, v0.4s, v1.4s336; CHECK-NEXT: add v0.4s, v2.4s, v0.4s337; CHECK-NEXT: addv s0, v0.4s338; CHECK-NEXT: fmov w8, s0339; CHECK-NEXT: lsr w9, w8, #16340; CHECK-NEXT: add w8, w9, w8, uxth341; CHECK-NEXT: lsr w0, w8, #1342; CHECK-NEXT: ret343entry:344 %idx.ext = sext i32 %i1 to i64345 %idx.ext63 = sext i32 %i2 to i64346 %arrayidx3 = getelementptr inbounds i8, ptr %p1, i64 4347 %arrayidx5 = getelementptr inbounds i8, ptr %p2, i64 4348 %0 = load <4 x i8>, ptr %p1, align 1349 %1 = load <4 x i8>, ptr %p2, align 1350 %add.ptr = getelementptr inbounds i8, ptr %p1, i64 %idx.ext351 %add.ptr64 = getelementptr inbounds i8, ptr %p2, i64 %idx.ext63352 %arrayidx3.1 = getelementptr inbounds i8, ptr %add.ptr, i64 4353 %arrayidx5.1 = getelementptr inbounds i8, ptr %add.ptr64, i64 4354 %2 = load <4 x i8>, ptr %add.ptr, align 1355 %3 = load <4 x i8>, ptr %add.ptr64, align 1356 %add.ptr.1 = getelementptr inbounds i8, ptr %add.ptr, i64 %idx.ext357 %add.ptr64.1 = getelementptr inbounds i8, ptr %add.ptr64, i64 %idx.ext63358 %arrayidx3.2 = getelementptr inbounds i8, ptr %add.ptr.1, i64 4359 %arrayidx5.2 = getelementptr inbounds i8, ptr %add.ptr64.1, i64 4360 %4 = load <4 x i8>, ptr %add.ptr.1, align 1361 %5 = load <4 x i8>, ptr %add.ptr64.1, align 1362 %add.ptr.2 = getelementptr inbounds i8, ptr %add.ptr.1, i64 %idx.ext363 %add.ptr64.2 = getelementptr inbounds i8, ptr %add.ptr64.1, i64 %idx.ext63364 %arrayidx3.3 = getelementptr inbounds i8, ptr %add.ptr.2, i64 4365 %arrayidx5.3 = getelementptr inbounds i8, ptr %add.ptr64.2, i64 4366 %6 = load <4 x i8>, ptr %add.ptr.2, align 1367 %7 = load <4 x i8>, ptr %add.ptr64.2, align 1368 %8 = load <4 x i8>, ptr %arrayidx3, align 1369 %9 = load <4 x i8>, ptr %arrayidx3.1, align 1370 %10 = load <4 x i8>, ptr %arrayidx3.2, align 1371 %11 = load <4 x i8>, ptr %arrayidx3.3, align 1372 %12 = shufflevector <4 x i8> %11, <4 x i8> %10, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>373 %13 = shufflevector <4 x i8> %9, <4 x i8> poison, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>374 %14 = shufflevector <16 x i8> %12, <16 x i8> %13, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 16, i32 17, i32 18, i32 19, i32 undef, i32 undef, i32 undef, i32 undef>375 %15 = shufflevector <4 x i8> %8, <4 x i8> poison, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>376 %16 = shufflevector <16 x i8> %14, <16 x i8> %15, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 16, i32 17, i32 18, i32 19>377 %17 = zext <16 x i8> %16 to <16 x i32>378 %18 = load <4 x i8>, ptr %arrayidx5, align 1379 %19 = load <4 x i8>, ptr %arrayidx5.1, align 1380 %20 = load <4 x i8>, ptr %arrayidx5.2, align 1381 %21 = load <4 x i8>, ptr %arrayidx5.3, align 1382 %22 = shufflevector <4 x i8> %21, <4 x i8> %20, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>383 %23 = shufflevector <4 x i8> %19, <4 x i8> poison, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>384 %24 = shufflevector <16 x i8> %22, <16 x i8> %23, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 16, i32 17, i32 18, i32 19, i32 undef, i32 undef, i32 undef, i32 undef>385 %25 = shufflevector <4 x i8> %18, <4 x i8> poison, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>386 %26 = shufflevector <16 x i8> %24, <16 x i8> %25, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 16, i32 17, i32 18, i32 19>387 %27 = zext <16 x i8> %26 to <16 x i32>388 %28 = shufflevector <4 x i8> %6, <4 x i8> %4, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>389 %29 = shufflevector <4 x i8> %2, <4 x i8> poison, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>390 %30 = shufflevector <16 x i8> %28, <16 x i8> %29, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 16, i32 17, i32 18, i32 19, i32 undef, i32 undef, i32 undef, i32 undef>391 %31 = shufflevector <4 x i8> %0, <4 x i8> poison, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>392 %32 = shufflevector <16 x i8> %30, <16 x i8> %31, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 16, i32 17, i32 18, i32 19>393 %33 = zext <16 x i8> %32 to <16 x i32>394 %34 = shufflevector <4 x i8> %7, <4 x i8> %5, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>395 %35 = shufflevector <4 x i8> %3, <4 x i8> poison, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>396 %36 = shufflevector <16 x i8> %34, <16 x i8> %35, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 16, i32 17, i32 18, i32 19, i32 undef, i32 undef, i32 undef, i32 undef>397 %37 = shufflevector <4 x i8> %1, <4 x i8> poison, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>398 %38 = shufflevector <16 x i8> %36, <16 x i8> %37, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 16, i32 17, i32 18, i32 19>399 %39 = zext <16 x i8> %38 to <16 x i32>400 %40 = sub nsw <16 x i32> %33, %39401 %41 = sub nsw <16 x i32> %17, %27402 %42 = shl nsw <16 x i32> %41, <i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16>403 %43 = add nsw <16 x i32> %42, %40404 %44 = shufflevector <16 x i32> %43, <16 x i32> poison, <16 x i32> <i32 3, i32 7, i32 11, i32 15, i32 6, i32 2, i32 10, i32 14, i32 5, i32 1, i32 9, i32 13, i32 4, i32 0, i32 8, i32 12>405 %reorder = shufflevector <16 x i32> %44, <16 x i32> poison, <16 x i32> <i32 5, i32 4, i32 6, i32 7, i32 1, i32 0, i32 2, i32 3, i32 12, i32 13, i32 14, i32 15, i32 8, i32 9, i32 10, i32 11>406 %45 = add nsw <16 x i32> %44, %reorder407 %46 = sub nsw <16 x i32> %44, %reorder408 %47 = shufflevector <16 x i32> %45, <16 x i32> %46, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 20, i32 21, i32 22, i32 23, i32 8, i32 9, i32 10, i32 11, i32 28, i32 29, i32 30, i32 31>409 %reorder191 = shufflevector <16 x i32> %45, <16 x i32> %46, <16 x i32> <i32 9, i32 8, i32 10, i32 11, i32 28, i32 29, i32 30, i32 31, i32 1, i32 0, i32 2, i32 3, i32 20, i32 21, i32 22, i32 23>410 %48 = add nsw <16 x i32> %47, %reorder191411 %49 = sub nsw <16 x i32> %47, %reorder191412 %50 = shufflevector <16 x i32> %48, <16 x i32> %49, <16 x i32> <i32 0, i32 5, i32 25, i32 29, i32 2, i32 6, i32 26, i32 30, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>413 %51 = shufflevector <16 x i32> %48, <16 x i32> %49, <16 x i32> <i32 1, i32 4, i32 24, i32 28, i32 3, i32 7, i32 27, i32 31, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>414 %52 = shufflevector <16 x i32> %48, <16 x i32> %49, <16 x i32> <i32 1, i32 4, i32 24, i32 28, i32 3, i32 7, i32 27, i32 31, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>415 %53 = shufflevector <16 x i32> %48, <16 x i32> %49, <16 x i32> <i32 0, i32 5, i32 25, i32 29, i32 2, i32 6, i32 26, i32 30, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>416 %54 = add nsw <16 x i32> %50, %52417 %55 = sub nsw <16 x i32> %51, %53418 %56 = shufflevector <16 x i32> %54, <16 x i32> %55, <16 x i32> <i32 0, i32 16, i32 17, i32 1, i32 18, i32 2, i32 19, i32 3, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>419 %57 = shufflevector <16 x i32> %54, <16 x i32> %55, <16 x i32> <i32 4, i32 20, i32 5, i32 21, i32 6, i32 22, i32 7, i32 23, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>420 %58 = shufflevector <16 x i32> %54, <16 x i32> %55, <16 x i32> <i32 4, i32 20, i32 21, i32 5, i32 22, i32 6, i32 23, i32 7, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>421 %59 = shufflevector <16 x i32> %54, <16 x i32> %55, <16 x i32> <i32 0, i32 16, i32 1, i32 17, i32 2, i32 18, i32 3, i32 19, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>422 %60 = add nsw <16 x i32> %56, %58423 %61 = sub nsw <16 x i32> %57, %59424 %62 = shufflevector <16 x i32> %60, <16 x i32> %61, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23>425 %63 = lshr <16 x i32> %62, <i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15>426 %64 = and <16 x i32> %63, <i32 65537, i32 65537, i32 65537, i32 65537, i32 65537, i32 65537, i32 65537, i32 65537, i32 65537, i32 65537, i32 65537, i32 65537, i32 65537, i32 65537, i32 65537, i32 65537>427 %65 = mul nuw <16 x i32> %64, <i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535>428 %66 = add <16 x i32> %65, %62429 %67 = xor <16 x i32> %66, %65430 %68 = call i32 @llvm.vector.reduce.add.v16i32(<16 x i32> %67)431 %conv118 = and i32 %68, 65535432 %shr = lshr i32 %68, 16433 %add119 = add nuw nsw i32 %conv118, %shr434 %shr120 = lshr i32 %add119, 1435 ret i32 %shr120436}437 438 439define i32 @v3(ptr nocapture noundef readonly %p1, i32 noundef %i1, ptr nocapture noundef readonly %p2, i32 noundef %i2) {440; CHECK-LABEL: v3:441; CHECK: // %bb.0: // %entry442; CHECK-NEXT: // kill: def $w3 killed $w3 def $x3443; CHECK-NEXT: // kill: def $w1 killed $w1 def $x1444; CHECK-NEXT: sxtw x8, w1445; CHECK-NEXT: sxtw x9, w3446; CHECK-NEXT: ldr d0, [x0]447; CHECK-NEXT: ldr d1, [x2]448; CHECK-NEXT: add x10, x0, x8449; CHECK-NEXT: add x11, x2, x9450; CHECK-NEXT: ldr d2, [x10]451; CHECK-NEXT: ldr d3, [x11]452; CHECK-NEXT: usubl v0.8h, v0.8b, v1.8b453; CHECK-NEXT: add x10, x10, x8454; CHECK-NEXT: add x11, x11, x9455; CHECK-NEXT: usubl v1.8h, v2.8b, v3.8b456; CHECK-NEXT: ldr d2, [x10, x8]457; CHECK-NEXT: ldr d3, [x11, x9]458; CHECK-NEXT: ldr d4, [x10]459; CHECK-NEXT: ldr d5, [x11]460; CHECK-NEXT: shll2 v6.4s, v0.8h, #16461; CHECK-NEXT: usubl v2.8h, v2.8b, v3.8b462; CHECK-NEXT: shll2 v3.4s, v1.8h, #16463; CHECK-NEXT: usubl v4.8h, v4.8b, v5.8b464; CHECK-NEXT: saddw v0.4s, v6.4s, v0.4h465; CHECK-NEXT: shll2 v5.4s, v2.8h, #16466; CHECK-NEXT: saddw v1.4s, v3.4s, v1.4h467; CHECK-NEXT: shll2 v3.4s, v4.8h, #16468; CHECK-NEXT: rev64 v6.4s, v0.4s469; CHECK-NEXT: saddw v2.4s, v5.4s, v2.4h470; CHECK-NEXT: rev64 v5.4s, v1.4s471; CHECK-NEXT: saddw v3.4s, v3.4s, v4.4h472; CHECK-NEXT: rev64 v4.4s, v2.4s473; CHECK-NEXT: sub v6.4s, v0.4s, v6.4s474; CHECK-NEXT: addp v0.4s, v1.4s, v0.4s475; CHECK-NEXT: rev64 v7.4s, v3.4s476; CHECK-NEXT: sub v5.4s, v1.4s, v5.4s477; CHECK-NEXT: addp v1.4s, v2.4s, v3.4s478; CHECK-NEXT: sub v2.4s, v2.4s, v4.4s479; CHECK-NEXT: ext v16.16b, v5.16b, v6.16b, #4480; CHECK-NEXT: sub v3.4s, v3.4s, v7.4s481; CHECK-NEXT: uzp2 v4.4s, v1.4s, v0.4s482; CHECK-NEXT: uzp1 v7.4s, v1.4s, v0.4s483; CHECK-NEXT: mov v6.s[3], v5.s[2]484; CHECK-NEXT: ext v0.16b, v0.16b, v0.16b, #8485; CHECK-NEXT: zip2 v17.4s, v2.4s, v3.4s486; CHECK-NEXT: zip1 v2.4s, v2.4s, v3.4s487; CHECK-NEXT: ext v3.16b, v16.16b, v5.16b, #4488; CHECK-NEXT: rev64 v4.4s, v4.4s489; CHECK-NEXT: rev64 v5.4s, v7.4s490; CHECK-NEXT: mov v17.d[1], v6.d[1]491; CHECK-NEXT: mov v2.d[1], v3.d[1]492; CHECK-NEXT: uzp1 v3.4s, v1.4s, v0.4s493; CHECK-NEXT: uzp2 v0.4s, v1.4s, v0.4s494; CHECK-NEXT: add v1.4s, v4.4s, v5.4s495; CHECK-NEXT: add v4.4s, v17.4s, v2.4s496; CHECK-NEXT: sub v0.4s, v3.4s, v0.4s497; CHECK-NEXT: sub v2.4s, v2.4s, v17.4s498; CHECK-NEXT: zip1 v3.4s, v1.4s, v4.4s499; CHECK-NEXT: uzp2 v5.4s, v1.4s, v4.4s500; CHECK-NEXT: zip1 v6.4s, v0.4s, v2.4s501; CHECK-NEXT: trn1 v7.4s, v0.4s, v2.4s502; CHECK-NEXT: zip2 v16.4s, v1.4s, v4.4s503; CHECK-NEXT: zip2 v2.4s, v0.4s, v2.4s504; CHECK-NEXT: trn2 v3.4s, v1.4s, v3.4s505; CHECK-NEXT: uzp2 v5.4s, v5.4s, v1.4s506; CHECK-NEXT: ext v0.16b, v0.16b, v6.16b, #8507; CHECK-NEXT: mov v1.s[1], v4.s[1]508; CHECK-NEXT: mov v16.d[1], v7.d[1]509; CHECK-NEXT: mov v3.d[1], v0.d[1]510; CHECK-NEXT: mov v5.d[1], v2.d[1]511; CHECK-NEXT: mov v1.d[1], v6.d[1]512; CHECK-NEXT: add v0.4s, v5.4s, v16.4s513; CHECK-NEXT: sub v4.4s, v16.4s, v5.4s514; CHECK-NEXT: add v2.4s, v3.4s, v1.4s515; CHECK-NEXT: sub v1.4s, v1.4s, v3.4s516; CHECK-NEXT: ext v3.16b, v0.16b, v0.16b, #4517; CHECK-NEXT: zip2 v6.4s, v0.4s, v4.4s518; CHECK-NEXT: zip2 v7.4s, v4.4s, v0.4s519; CHECK-NEXT: ext v5.16b, v2.16b, v2.16b, #4520; CHECK-NEXT: zip2 v16.4s, v1.4s, v2.4s521; CHECK-NEXT: zip2 v17.4s, v2.4s, v1.4s522; CHECK-NEXT: zip1 v0.4s, v0.4s, v4.4s523; CHECK-NEXT: ext v18.16b, v3.16b, v4.16b, #8524; CHECK-NEXT: ext v19.16b, v5.16b, v1.16b, #8525; CHECK-NEXT: zip1 v1.4s, v2.4s, v1.4s526; CHECK-NEXT: add v2.4s, v16.4s, v7.4s527; CHECK-NEXT: sub v4.4s, v6.4s, v17.4s528; CHECK-NEXT: ext v3.16b, v18.16b, v3.16b, #4529; CHECK-NEXT: cmlt v6.8h, v2.8h, #0530; CHECK-NEXT: ext v5.16b, v19.16b, v5.16b, #4531; CHECK-NEXT: sub v0.4s, v0.4s, v1.4s532; CHECK-NEXT: cmlt v1.8h, v4.8h, #0533; CHECK-NEXT: add v2.4s, v6.4s, v2.4s534; CHECK-NEXT: add v4.4s, v1.4s, v4.4s535; CHECK-NEXT: add v3.4s, v5.4s, v3.4s536; CHECK-NEXT: cmlt v5.8h, v0.8h, #0537; CHECK-NEXT: eor v2.16b, v2.16b, v6.16b538; CHECK-NEXT: eor v1.16b, v4.16b, v1.16b539; CHECK-NEXT: cmlt v7.8h, v3.8h, #0540; CHECK-NEXT: add v0.4s, v5.4s, v0.4s541; CHECK-NEXT: add v1.4s, v2.4s, v1.4s542; CHECK-NEXT: add v3.4s, v7.4s, v3.4s543; CHECK-NEXT: eor v0.16b, v0.16b, v5.16b544; CHECK-NEXT: eor v2.16b, v3.16b, v7.16b545; CHECK-NEXT: add v0.4s, v0.4s, v1.4s546; CHECK-NEXT: add v0.4s, v2.4s, v0.4s547; CHECK-NEXT: addv s0, v0.4s548; CHECK-NEXT: fmov w8, s0549; CHECK-NEXT: lsr w9, w8, #16550; CHECK-NEXT: add w8, w9, w8, uxth551; CHECK-NEXT: lsr w0, w8, #1552; CHECK-NEXT: ret553entry:554 %idx.ext = sext i32 %i1 to i64555 %idx.ext63 = sext i32 %i2 to i64556 %arrayidx3 = getelementptr inbounds i8, ptr %p1, i64 4557 %arrayidx5 = getelementptr inbounds i8, ptr %p2, i64 4558 %add.ptr = getelementptr inbounds i8, ptr %p1, i64 %idx.ext559 %add.ptr64 = getelementptr inbounds i8, ptr %p2, i64 %idx.ext63560 %arrayidx3.1 = getelementptr inbounds i8, ptr %add.ptr, i64 4561 %arrayidx5.1 = getelementptr inbounds i8, ptr %add.ptr64, i64 4562 %add.ptr.1 = getelementptr inbounds i8, ptr %add.ptr, i64 %idx.ext563 %add.ptr64.1 = getelementptr inbounds i8, ptr %add.ptr64, i64 %idx.ext63564 %arrayidx3.2 = getelementptr inbounds i8, ptr %add.ptr.1, i64 4565 %arrayidx5.2 = getelementptr inbounds i8, ptr %add.ptr64.1, i64 4566 %add.ptr.2 = getelementptr inbounds i8, ptr %add.ptr.1, i64 %idx.ext567 %add.ptr64.2 = getelementptr inbounds i8, ptr %add.ptr64.1, i64 %idx.ext63568 %arrayidx3.3 = getelementptr inbounds i8, ptr %add.ptr.2, i64 4569 %arrayidx5.3 = getelementptr inbounds i8, ptr %add.ptr64.2, i64 4570 %0 = load <4 x i8>, ptr %p1, align 1571 %1 = load <4 x i8>, ptr %p2, align 1572 %2 = load <4 x i8>, ptr %arrayidx3, align 1573 %3 = load <4 x i8>, ptr %arrayidx5, align 1574 %4 = load <4 x i8>, ptr %add.ptr, align 1575 %5 = load <4 x i8>, ptr %add.ptr64, align 1576 %6 = load <4 x i8>, ptr %arrayidx3.1, align 1577 %7 = load <4 x i8>, ptr %arrayidx5.1, align 1578 %8 = load <4 x i8>, ptr %add.ptr.1, align 1579 %9 = load <4 x i8>, ptr %add.ptr64.1, align 1580 %10 = load <4 x i8>, ptr %arrayidx3.2, align 1581 %11 = load <4 x i8>, ptr %arrayidx5.2, align 1582 %12 = load <4 x i8>, ptr %add.ptr.2, align 1583 %13 = shufflevector <4 x i8> %12, <4 x i8> %8, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>584 %14 = shufflevector <4 x i8> %4, <4 x i8> poison, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>585 %15 = shufflevector <16 x i8> %13, <16 x i8> %14, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 16, i32 17, i32 18, i32 19, i32 undef, i32 undef, i32 undef, i32 undef>586 %16 = shufflevector <4 x i8> %0, <4 x i8> poison, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>587 %17 = shufflevector <16 x i8> %15, <16 x i8> %16, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 16, i32 17, i32 18, i32 19>588 %18 = zext <16 x i8> %17 to <16 x i32>589 %19 = load <4 x i8>, ptr %add.ptr64.2, align 1590 %20 = shufflevector <4 x i8> %19, <4 x i8> %9, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>591 %21 = shufflevector <4 x i8> %5, <4 x i8> poison, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>592 %22 = shufflevector <16 x i8> %20, <16 x i8> %21, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 16, i32 17, i32 18, i32 19, i32 undef, i32 undef, i32 undef, i32 undef>593 %23 = shufflevector <4 x i8> %1, <4 x i8> poison, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>594 %24 = shufflevector <16 x i8> %22, <16 x i8> %23, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 16, i32 17, i32 18, i32 19>595 %25 = zext <16 x i8> %24 to <16 x i32>596 %26 = sub nsw <16 x i32> %18, %25597 %27 = load <4 x i8>, ptr %arrayidx3.3, align 1598 %28 = shufflevector <4 x i8> %27, <4 x i8> %10, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>599 %29 = shufflevector <4 x i8> %6, <4 x i8> poison, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>600 %30 = shufflevector <16 x i8> %28, <16 x i8> %29, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 16, i32 17, i32 18, i32 19, i32 undef, i32 undef, i32 undef, i32 undef>601 %31 = shufflevector <4 x i8> %2, <4 x i8> poison, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>602 %32 = shufflevector <16 x i8> %30, <16 x i8> %31, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 16, i32 17, i32 18, i32 19>603 %33 = zext <16 x i8> %32 to <16 x i32>604 %34 = load <4 x i8>, ptr %arrayidx5.3, align 1605 %35 = shufflevector <4 x i8> %34, <4 x i8> %11, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>606 %36 = shufflevector <4 x i8> %7, <4 x i8> poison, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>607 %37 = shufflevector <16 x i8> %35, <16 x i8> %36, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 16, i32 17, i32 18, i32 19, i32 undef, i32 undef, i32 undef, i32 undef>608 %38 = shufflevector <4 x i8> %3, <4 x i8> poison, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>609 %39 = shufflevector <16 x i8> %37, <16 x i8> %38, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 16, i32 17, i32 18, i32 19>610 %40 = zext <16 x i8> %39 to <16 x i32>611 %41 = sub nsw <16 x i32> %33, %40612 %42 = shl nsw <16 x i32> %41, <i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16>613 %43 = add nsw <16 x i32> %42, %26614 %reorder = shufflevector <16 x i32> %43, <16 x i32> poison, <16 x i32> <i32 1, i32 0, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6, i32 9, i32 8, i32 11, i32 10, i32 13, i32 12, i32 15, i32 14>615 %44 = add nsw <16 x i32> %43, %reorder616 %45 = sub nsw <16 x i32> %43, %reorder617 %46 = shufflevector <16 x i32> %44, <16 x i32> %45, <16 x i32> <i32 7, i32 3, i32 15, i32 11, i32 18, i32 22, i32 30, i32 26, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>618 %47 = shufflevector <16 x i32> %44, <16 x i32> %45, <16 x i32> <i32 1, i32 5, i32 13, i32 9, i32 16, i32 20, i32 28, i32 24, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>619 %48 = shufflevector <16 x i32> %44, <16 x i32> %45, <16 x i32> <i32 5, i32 1, i32 13, i32 9, i32 16, i32 20, i32 28, i32 24, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>620 %49 = shufflevector <16 x i32> %44, <16 x i32> %45, <16 x i32> <i32 3, i32 7, i32 15, i32 11, i32 18, i32 22, i32 30, i32 26, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>621 %50 = add nsw <16 x i32> %46, %48622 %51 = sub nsw <16 x i32> %47, %49623 %52 = shufflevector <16 x i32> %50, <16 x i32> %51, <16 x i32> <i32 1, i32 4, i32 16, i32 20, i32 3, i32 7, i32 19, i32 23, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>624 %53 = shufflevector <16 x i32> %50, <16 x i32> %51, <16 x i32> <i32 0, i32 5, i32 17, i32 21, i32 2, i32 6, i32 18, i32 22, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>625 %54 = shufflevector <16 x i32> %50, <16 x i32> %51, <16 x i32> <i32 0, i32 5, i32 17, i32 21, i32 2, i32 6, i32 18, i32 22, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>626 %55 = shufflevector <16 x i32> %50, <16 x i32> %51, <16 x i32> <i32 1, i32 4, i32 16, i32 20, i32 3, i32 7, i32 19, i32 23, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>627 %56 = add nsw <16 x i32> %52, %54628 %57 = sub nsw <16 x i32> %53, %55629 %58 = shufflevector <16 x i32> %56, <16 x i32> %57, <16 x i32> <i32 0, i32 16, i32 17, i32 1, i32 18, i32 2, i32 19, i32 3, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>630 %59 = shufflevector <16 x i32> %56, <16 x i32> %57, <16 x i32> <i32 4, i32 20, i32 5, i32 21, i32 6, i32 22, i32 7, i32 23, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>631 %60 = shufflevector <16 x i32> %56, <16 x i32> %57, <16 x i32> <i32 4, i32 20, i32 21, i32 5, i32 22, i32 6, i32 23, i32 7, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>632 %61 = shufflevector <16 x i32> %56, <16 x i32> %57, <16 x i32> <i32 0, i32 16, i32 1, i32 17, i32 2, i32 18, i32 3, i32 19, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>633 %62 = add nsw <16 x i32> %58, %60634 %63 = sub nsw <16 x i32> %59, %61635 %64 = shufflevector <16 x i32> %62, <16 x i32> %63, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23>636 %65 = lshr <16 x i32> %64, <i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15>637 %66 = and <16 x i32> %65, <i32 65537, i32 65537, i32 65537, i32 65537, i32 65537, i32 65537, i32 65537, i32 65537, i32 65537, i32 65537, i32 65537, i32 65537, i32 65537, i32 65537, i32 65537, i32 65537>638 %67 = mul nuw <16 x i32> %66, <i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535>639 %68 = add <16 x i32> %67, %64640 %69 = xor <16 x i32> %68, %67641 %70 = call i32 @llvm.vector.reduce.add.v16i32(<16 x i32> %69)642 %conv118 = and i32 %70, 65535643 %shr = lshr i32 %70, 16644 %add119 = add nuw nsw i32 %conv118, %shr645 %shr120 = lshr i32 %add119, 1646 ret i32 %shr120647}648 649declare i32 @llvm.vector.reduce.add.v16i32(<16 x i32>)650