2700 lines · plain
1; RUN: opt -mtriple=wasm32 -mattr=+simd128 -passes=loop-vectorize %s | llc -mtriple=wasm32 -mattr=+simd128 -asm-verbose=false -disable-wasm-fallthrough-return-opt | FileCheck %s2 3target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-n32:64-S128-ni:1:10:20"4 5%struct.TwoInts = type { i32, i32 }6%struct.ThreeInts = type { i32, i32, i32 }7%struct.FourInts = type { i32, i32, i32, i32 }8%struct.TwoShorts = type { i16, i16 }9%struct.ThreeShorts = type { i16, i16, i16 }10%struct.FourShorts = type { i16, i16, i16, i16 }11%struct.FiveShorts = type { i16, i16, i16, i16, i16 }12%struct.TwoBytes = type { i8, i8 }13%struct.ThreeBytes = type { i8, i8, i8 }14%struct.FourBytes = type { i8, i8, i8, i8 }15%struct.EightBytes = type { i8, i8, i8, i8, i8, i8, i8, i8 }16%struct.TwoFloats = type { float, float }17%struct.FourFloats = type { float, float, float, float }18 19; CHECK-LABEL: two_ints_same_op:20; CHECK: loop21; CHECK: v128.load22; CHECK: v128.load23; CHECK: i8x16.shuffle 0, 1, 2, 3, 8, 9, 10, 11, 16, 17, 18, 19, 24, 25, 26, 2724; CHECK: v128.load25; CHECK: v128.load26; CHECK: i8x16.shuffle 0, 1, 2, 3, 8, 9, 10, 11, 16, 17, 18, 19, 24, 25, 26, 2727; CHECK: i32x4.add28; CHECK: i8x16.shuffle 4, 5, 6, 7, 12, 13, 14, 15, 20, 21, 22, 23, 28, 29, 30, 3129; CHECK: i8x16.shuffle 4, 5, 6, 7, 12, 13, 14, 15, 20, 21, 22, 23, 28, 29, 30, 3130; CHECK: i32x4.add31; CHECK: i8x16.shuffle 8, 9, 10, 11, 24, 25, 26, 27, 12, 13, 14, 15, 28, 29, 30, 3132; CHECK: v128.store33; CHECK: i8x16.shuffle 0, 1, 2, 3, 16, 17, 18, 19, 4, 5, 6, 7, 20, 21, 22, 2334; CHECK: v128.store35define hidden void @two_ints_same_op(ptr noalias nocapture noundef writeonly %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2, i32 noundef %3) {36 %5 = icmp eq i32 %3, 037 br i1 %5, label %6, label %738 396: ; preds = %7, %440 ret void41 427: ; preds = %4, %743 %8 = phi i32 [ %21, %7 ], [ 0, %4 ]44 %9 = getelementptr inbounds %struct.TwoInts, ptr %1, i32 %845 %10 = load i32, ptr %9, align 446 %11 = getelementptr inbounds %struct.TwoInts, ptr %2, i32 %847 %12 = load i32, ptr %11, align 448 %13 = add i32 %12, %1049 %14 = getelementptr inbounds %struct.TwoInts, ptr %0, i32 %850 store i32 %13, ptr %14, align 451 %15 = getelementptr inbounds i8, ptr %9, i32 452 %16 = load i32, ptr %15, align 453 %17 = getelementptr inbounds i8, ptr %11, i32 454 %18 = load i32, ptr %17, align 455 %19 = add i32 %18, %1656 %20 = getelementptr inbounds i8, ptr %14, i32 457 store i32 %19, ptr %20, align 458 %21 = add nuw i32 %8, 159 %22 = icmp eq i32 %21, %360 br i1 %22, label %6, label %761}62 63; CHECK-LABEL: two_ints_vary_op:64; CHECK: loop65; CHECK: v128.load66; CHECK: v128.load67; CHECK: i8x16.shuffle 0, 1, 2, 3, 8, 9, 10, 11, 16, 17, 18, 19, 24, 25, 26, 2768; CHECK: v128.load69; CHECK: v128.load70; CHECK: i8x16.shuffle 0, 1, 2, 3, 8, 9, 10, 11, 16, 17, 18, 19, 24, 25, 26, 2771; CHECK: i32x4.add72; CHECK: i8x16.shuffle 4, 5, 6, 7, 12, 13, 14, 15, 20, 21, 22, 23, 28, 29, 30, 3173; CHECK: i8x16.shuffle 4, 5, 6, 7, 12, 13, 14, 15, 20, 21, 22, 23, 28, 29, 30, 3174; CHECK: i32x4.sub75; CHECK: i8x16.shuffle 8, 9, 10, 11, 24, 25, 26, 27, 12, 13, 14, 15, 28, 29, 30, 3176; CHECK: v128.store77; CHECK: i8x16.shuffle 0, 1, 2, 3, 16, 17, 18, 19, 4, 5, 6, 7, 20, 21, 22, 2378; CHECK: v128.store79define hidden void @two_ints_vary_op(ptr noalias nocapture noundef writeonly %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2, i32 noundef %3) {80 %5 = icmp eq i32 %3, 081 br i1 %5, label %6, label %782 836: ; preds = %7, %484 ret void85 867: ; preds = %4, %787 %8 = phi i32 [ %21, %7 ], [ 0, %4 ]88 %9 = getelementptr inbounds %struct.TwoInts, ptr %1, i32 %889 %10 = load i32, ptr %9, align 490 %11 = getelementptr inbounds %struct.TwoInts, ptr %2, i32 %891 %12 = load i32, ptr %11, align 492 %13 = add i32 %12, %1093 %14 = getelementptr inbounds %struct.TwoInts, ptr %0, i32 %894 store i32 %13, ptr %14, align 495 %15 = getelementptr inbounds i8, ptr %9, i32 496 %16 = load i32, ptr %15, align 497 %17 = getelementptr inbounds i8, ptr %11, i32 498 %18 = load i32, ptr %17, align 499 %19 = sub i32 %16, %18100 %20 = getelementptr inbounds i8, ptr %14, i32 4101 store i32 %19, ptr %20, align 4102 %21 = add nuw i32 %8, 1103 %22 = icmp eq i32 %21, %3104 br i1 %22, label %6, label %7105}106 107; CHECK-LABEL: three_ints:108; CHECK: loop109; CHECK-NOT: v128.load110; CHECK: i32.load111; CHECK: i32.load112; CHECK: i32.add113; CHECK: i32.store114; CHECK: i32.load115; CHECK: i32.load116; CHECK: i32.add117; CHECK: i32.store118; CHECK: i32.load119; CHECK: i32.load120; CHECK: i32.add121; CHECK: i32.store122define hidden void @three_ints(ptr noalias nocapture noundef writeonly %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2, i32 noundef %3) {123 %5 = icmp eq i32 %3, 0124 br i1 %5, label %6, label %7125 1266: ; preds = %7, %4127 ret void128 1297: ; preds = %4, %7130 %8 = phi i32 [ %27, %7 ], [ 0, %4 ]131 %9 = getelementptr inbounds %struct.ThreeInts, ptr %1, i32 %8132 %10 = load i32, ptr %9, align 4133 %11 = getelementptr inbounds %struct.ThreeInts, ptr %2, i32 %8134 %12 = load i32, ptr %11, align 4135 %13 = add nsw i32 %12, %10136 %14 = getelementptr inbounds %struct.ThreeInts, ptr %0, i32 %8137 store i32 %13, ptr %14, align 4138 %15 = getelementptr inbounds i8, ptr %9, i32 4139 %16 = load i32, ptr %15, align 4140 %17 = getelementptr inbounds i8, ptr %11, i32 4141 %18 = load i32, ptr %17, align 4142 %19 = add nsw i32 %18, %16143 %20 = getelementptr inbounds i8, ptr %14, i32 4144 store i32 %19, ptr %20, align 4145 %21 = getelementptr inbounds i8, ptr %9, i32 8146 %22 = load i32, ptr %21, align 4147 %23 = getelementptr inbounds i8, ptr %11, i32 8148 %24 = load i32, ptr %23, align 4149 %25 = add nsw i32 %24, %22150 %26 = getelementptr inbounds i8, ptr %14, i32 8151 store i32 %25, ptr %26, align 4152 %27 = add nuw i32 %8, 1153 %28 = icmp eq i32 %27, %3154 br i1 %28, label %6, label %7155}156 157; CHECK-LABEL: three_shorts:158; CHECK: loop159; CHECK-NOT: v128.load160; CHECK: i32.load16_u161; CHECK: i32.load16_u162; CHECK: i32.mul163; CHECK: i32.store16164; CHECK: i32.load16_u165; CHECK: i32.load16_u166; CHECK: i32.mul167; CHECK: i32.store16168; CHECK: i32.load16_u169; CHECK: i32.load16_u170; CHECK: i32.mul171; CHECK: i32.store16172define hidden void @three_shorts(ptr noalias nocapture noundef writeonly %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2, i32 noundef %3) {173 %5 = icmp eq i32 %3, 0174 br i1 %5, label %6, label %7175 1766: ; preds = %7, %4177 ret void178 1797: ; preds = %4, %7180 %8 = phi i32 [ %27, %7 ], [ 0, %4 ]181 %9 = getelementptr inbounds %struct.ThreeShorts, ptr %1, i32 %8182 %10 = load i16, ptr %9, align 2183 %11 = getelementptr inbounds %struct.ThreeShorts, ptr %2, i32 %8184 %12 = load i16, ptr %11, align 2185 %13 = mul i16 %12, %10186 %14 = getelementptr inbounds %struct.ThreeShorts, ptr %0, i32 %8187 store i16 %13, ptr %14, align 2188 %15 = getelementptr inbounds i8, ptr %9, i32 2189 %16 = load i16, ptr %15, align 2190 %17 = getelementptr inbounds i8, ptr %11, i32 2191 %18 = load i16, ptr %17, align 2192 %19 = mul i16 %18, %16193 %20 = getelementptr inbounds i8, ptr %14, i32 2194 store i16 %19, ptr %20, align 2195 %21 = getelementptr inbounds i8, ptr %9, i32 4196 %22 = load i16, ptr %21, align 2197 %23 = getelementptr inbounds i8, ptr %11, i32 4198 %24 = load i16, ptr %23, align 2199 %25 = mul i16 %24, %22200 %26 = getelementptr inbounds i8, ptr %14, i32 4201 store i16 %25, ptr %26, align 2202 %27 = add nuw i32 %8, 1203 %28 = icmp eq i32 %27, %3204 br i1 %28, label %6, label %7205}206 207; CHECK-LABEL: four_shorts_same_op:208; CHECK: loop209; CHECK: v128.load210; CHECK: v128.load211; CHECK: i8x16.shuffle 0, 1, 8, 9, 16, 17, 24, 25, 0, 1, 0, 1, 0, 1, 0, 1212; CHECK: v128.load213; CHECK: v128.load214; CHECK: i8x16.shuffle 0, 1, 8, 9, 16, 17, 24, 25, 0, 1, 0, 1, 0, 1, 0, 1215; CHECK: i16x8.sub216; CHECK: i8x16.shuffle 2, 3, 10, 11, 18, 19, 26, 27, 0, 1, 0, 1, 0, 1, 0, 1217; CHECK: i8x16.shuffle 2, 3, 10, 11, 18, 19, 26, 27, 0, 1, 0, 1, 0, 1, 0, 1218; CHECK: i16x8.sub219; CHECK: i8x16.shuffle 4, 5, 20, 21, 0, 1, 0, 1, 6, 7, 22, 23, 0, 1, 0, 1220; CHECK: i8x16.shuffle 4, 5, 12, 13, 20, 21, 28, 29, 0, 1, 0, 1, 0, 1, 0, 1221; CHECK: i8x16.shuffle 4, 5, 12, 13, 20, 21, 28, 29, 0, 1, 0, 1, 0, 1, 0, 1222; CHECK: i16x8.sub223; CHECK: i8x16.shuffle 6, 7, 14, 15, 22, 23, 30, 31, 0, 1, 0, 1, 0, 1, 0, 1224; CHECK: i8x16.shuffle 6, 7, 14, 15, 22, 23, 30, 31, 0, 1, 0, 1, 0, 1, 0, 1225; CHECK: i16x8.sub226; CHECK: i8x16.shuffle 0, 1, 0, 1, 4, 5, 20, 21, 0, 1, 0, 1, 6, 7, 22, 23227; CHECK: i8x16.shuffle 0, 1, 2, 3, 20, 21, 22, 23, 8, 9, 10, 11, 28, 29, 30, 31228; CHECK: v128.store229; CHECK: i8x16.shuffle 0, 1, 16, 17, 0, 1, 0, 1, 2, 3, 18, 19, 0, 1, 0, 1230; CHECK: i8x16.shuffle 0, 1, 0, 1, 0, 1, 16, 17, 0, 1, 0, 1, 2, 3, 18, 19231; CHECK: i8x16.shuffle 0, 1, 2, 3, 20, 21, 22, 23, 8, 9, 10, 11, 28, 29, 30, 31232; CHECK: v128.store233define hidden void @four_shorts_same_op(ptr noalias nocapture noundef writeonly %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2, i32 noundef %3) {234 %5 = icmp eq i32 %3, 0235 br i1 %5, label %6, label %7236 2376: ; preds = %7, %4238 ret void239 2407: ; preds = %4, %7241 %8 = phi i32 [ %33, %7 ], [ 0, %4 ]242 %9 = getelementptr inbounds %struct.FourShorts, ptr %1, i32 %8243 %10 = load i16, ptr %9, align 2244 %11 = getelementptr inbounds %struct.FourShorts, ptr %2, i32 %8245 %12 = load i16, ptr %11, align 2246 %13 = sub i16 %10, %12247 %14 = getelementptr inbounds %struct.FourShorts, ptr %0, i32 %8248 store i16 %13, ptr %14, align 2249 %15 = getelementptr inbounds i8, ptr %9, i32 2250 %16 = load i16, ptr %15, align 2251 %17 = getelementptr inbounds i8, ptr %11, i32 2252 %18 = load i16, ptr %17, align 2253 %19 = sub i16 %16, %18254 %20 = getelementptr inbounds i8, ptr %14, i32 2255 store i16 %19, ptr %20, align 2256 %21 = getelementptr inbounds i8, ptr %9, i32 4257 %22 = load i16, ptr %21, align 2258 %23 = getelementptr inbounds i8, ptr %11, i32 4259 %24 = load i16, ptr %23, align 2260 %25 = sub i16 %22, %24261 %26 = getelementptr inbounds i8, ptr %14, i32 4262 store i16 %25, ptr %26, align 2263 %27 = getelementptr inbounds i8, ptr %9, i32 6264 %28 = load i16, ptr %27, align 2265 %29 = getelementptr inbounds i8, ptr %11, i32 6266 %30 = load i16, ptr %29, align 2267 %31 = sub i16 %28, %30268 %32 = getelementptr inbounds i8, ptr %14, i32 6269 store i16 %31, ptr %32, align 2270 %33 = add nuw i32 %8, 1271 %34 = icmp eq i32 %33, %3272 br i1 %34, label %6, label %7273}274 275; CHECK-LABEL: four_shorts_split_op:276; CHECK: loop277; CHECK: v128.load278; CHECK: v128.load279; CHECK: i8x16.shuffle 0, 1, 8, 9, 16, 17, 24, 25, 0, 1, 0, 1, 0, 1, 0, 1280; CHECK: v128.load281; CHECK: v128.load282; CHECK: i8x16.shuffle 0, 1, 8, 9, 16, 17, 24, 25, 0, 1, 0, 1, 0, 1, 0, 1283; CHECK: v128.or284; CHECK: i8x16.shuffle 2, 3, 10, 11, 18, 19, 26, 27, 0, 1, 0, 1, 0, 1, 0, 1285; CHECK: i8x16.shuffle 2, 3, 10, 11, 18, 19, 26, 27, 0, 1, 0, 1, 0, 1, 0, 1286; CHECK: v128.or287; CHECK: i8x16.shuffle 4, 5, 20, 21, 0, 1, 0, 1, 6, 7, 22, 23, 0, 1, 0, 1288; CHECK: i8x16.shuffle 4, 5, 12, 13, 20, 21, 28, 29, 0, 1, 0, 1, 0, 1, 0, 1289; CHECK: i8x16.shuffle 4, 5, 12, 13, 20, 21, 28, 29, 0, 1, 0, 1, 0, 1, 0, 1290; CHECK: v128.xor291; CHECK: i8x16.shuffle 6, 7, 14, 15, 22, 23, 30, 31, 0, 1, 0, 1, 0, 1, 0, 1292; CHECK: i8x16.shuffle 6, 7, 14, 15, 22, 23, 30, 31, 0, 1, 0, 1, 0, 1, 0, 1293; CHECK: v128.xor294; CHECK: i8x16.shuffle 0, 1, 0, 1, 4, 5, 20, 21, 0, 1, 0, 1, 6, 7, 22, 23295; CHECK: i8x16.shuffle 0, 1, 2, 3, 20, 21, 22, 23, 8, 9, 10, 11, 28, 29, 30, 31296; CHECK: v128.store297; CHECK: i8x16.shuffle 0, 1, 16, 17, 0, 1, 0, 1, 2, 3, 18, 19, 0, 1, 0, 1298; CHECK: i8x16.shuffle 0, 1, 0, 1, 0, 1, 16, 17, 0, 1, 0, 1, 2, 3, 18, 19299; CHECK: i8x16.shuffle 0, 1, 2, 3, 20, 21, 22, 23, 8, 9, 10, 11, 28, 29, 30, 31300; CHECK: v128.store301define hidden void @four_shorts_split_op(ptr noalias nocapture noundef writeonly %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2, i32 noundef %3) {302 %5 = icmp eq i32 %3, 0303 br i1 %5, label %6, label %7304 3056: ; preds = %7, %4306 ret void307 3087: ; preds = %4, %7309 %8 = phi i32 [ %33, %7 ], [ 0, %4 ]310 %9 = getelementptr inbounds %struct.FourShorts, ptr %1, i32 %8311 %10 = load i16, ptr %9, align 2312 %11 = getelementptr inbounds %struct.FourShorts, ptr %2, i32 %8313 %12 = load i16, ptr %11, align 2314 %13 = or i16 %12, %10315 %14 = getelementptr inbounds %struct.FourShorts, ptr %0, i32 %8316 store i16 %13, ptr %14, align 2317 %15 = getelementptr inbounds i8, ptr %9, i32 2318 %16 = load i16, ptr %15, align 2319 %17 = getelementptr inbounds i8, ptr %11, i32 2320 %18 = load i16, ptr %17, align 2321 %19 = or i16 %18, %16322 %20 = getelementptr inbounds i8, ptr %14, i32 2323 store i16 %19, ptr %20, align 2324 %21 = getelementptr inbounds i8, ptr %9, i32 4325 %22 = load i16, ptr %21, align 2326 %23 = getelementptr inbounds i8, ptr %11, i32 4327 %24 = load i16, ptr %23, align 2328 %25 = xor i16 %24, %22329 %26 = getelementptr inbounds i8, ptr %14, i32 4330 store i16 %25, ptr %26, align 2331 %27 = getelementptr inbounds i8, ptr %9, i32 6332 %28 = load i16, ptr %27, align 2333 %29 = getelementptr inbounds i8, ptr %11, i32 6334 %30 = load i16, ptr %29, align 2335 %31 = xor i16 %30, %28336 %32 = getelementptr inbounds i8, ptr %14, i32 6337 store i16 %31, ptr %32, align 2338 %33 = add nuw i32 %8, 1339 %34 = icmp eq i32 %33, %3340 br i1 %34, label %6, label %7341}342 343; CHECK-LABEL: four_shorts_interleave_op:344; CHECK: v128.load345; CHECK: v128.load346; CHECK: i8x16.shuffle 0, 1, 8, 9, 16, 17, 24, 25, 0, 1, 0, 1, 0, 1, 0, 1347; CHECK: v128.load348; CHECK: v128.load349; CHECK: i8x16.shuffle 0, 1, 8, 9, 16, 17, 24, 25, 0, 1, 0, 1, 0, 1, 0, 1350; CHECK: v128.or351; CHECK: i8x16.shuffle 2, 3, 10, 11, 18, 19, 26, 27, 0, 1, 0, 1, 0, 1, 0, 1352; CHECK: i8x16.shuffle 2, 3, 10, 11, 18, 19, 26, 27, 0, 1, 0, 1, 0, 1, 0, 1353; CHECK: v128.xor354; CHECK: i8x16.shuffle 4, 5, 20, 21, 0, 1, 0, 1, 6, 7, 22, 23, 0, 1, 0, 1355; CHECK: i8x16.shuffle 4, 5, 12, 13, 20, 21, 28, 29, 0, 1, 0, 1, 0, 1, 0, 1356; CHECK: i8x16.shuffle 4, 5, 12, 13, 20, 21, 28, 29, 0, 1, 0, 1, 0, 1, 0, 1357; CHECK: v128.or358; CHECK: i8x16.shuffle 6, 7, 14, 15, 22, 23, 30, 31, 0, 1, 0, 1, 0, 1, 0, 1359; CHECK: i8x16.shuffle 6, 7, 14, 15, 22, 23, 30, 31, 0, 1, 0, 1, 0, 1, 0, 1360; CHECK: v128.xor361; CHECK: i8x16.shuffle 0, 1, 0, 1, 4, 5, 20, 21, 0, 1, 0, 1, 6, 7, 22, 23362; CHECK: i8x16.shuffle 0, 1, 2, 3, 20, 21, 22, 23, 8, 9, 10, 11, 28, 29, 30, 31363; CHECK: v128.store364; CHECK: i8x16.shuffle 0, 1, 16, 17, 0, 1, 0, 1, 2, 3, 18, 19, 0, 1, 0, 1365; CHECK: i8x16.shuffle 0, 1, 0, 1, 0, 1, 16, 17, 0, 1, 0, 1, 2, 3, 18, 19366; CHECK: i8x16.shuffle 0, 1, 2, 3, 20, 21, 22, 23, 8, 9, 10, 11, 28, 29, 30, 31367; CHECK: v128.store368define hidden void @four_shorts_interleave_op(ptr noalias nocapture noundef writeonly %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2, i32 noundef %3) {369 %5 = icmp eq i32 %3, 0370 br i1 %5, label %6, label %7371 3726: ; preds = %7, %4373 ret void374 3757: ; preds = %4, %7376 %8 = phi i32 [ %33, %7 ], [ 0, %4 ]377 %9 = getelementptr inbounds %struct.FourShorts, ptr %1, i32 %8378 %10 = load i16, ptr %9, align 2379 %11 = getelementptr inbounds %struct.FourShorts, ptr %2, i32 %8380 %12 = load i16, ptr %11, align 2381 %13 = or i16 %12, %10382 %14 = getelementptr inbounds %struct.FourShorts, ptr %0, i32 %8383 store i16 %13, ptr %14, align 2384 %15 = getelementptr inbounds i8, ptr %9, i32 2385 %16 = load i16, ptr %15, align 2386 %17 = getelementptr inbounds i8, ptr %11, i32 2387 %18 = load i16, ptr %17, align 2388 %19 = xor i16 %18, %16389 %20 = getelementptr inbounds i8, ptr %14, i32 2390 store i16 %19, ptr %20, align 2391 %21 = getelementptr inbounds i8, ptr %9, i32 4392 %22 = load i16, ptr %21, align 2393 %23 = getelementptr inbounds i8, ptr %11, i32 4394 %24 = load i16, ptr %23, align 2395 %25 = or i16 %24, %22396 %26 = getelementptr inbounds i8, ptr %14, i32 4397 store i16 %25, ptr %26, align 2398 %27 = getelementptr inbounds i8, ptr %9, i32 6399 %28 = load i16, ptr %27, align 2400 %29 = getelementptr inbounds i8, ptr %11, i32 6401 %30 = load i16, ptr %29, align 2402 %31 = xor i16 %30, %28403 %32 = getelementptr inbounds i8, ptr %14, i32 6404 store i16 %31, ptr %32, align 2405 %33 = add nuw i32 %8, 1406 %34 = icmp eq i32 %33, %3407 br i1 %34, label %6, label %7408}409 410; CHECK-LABEL: five_shorts:411; CHECK: loop412; CHECK-NOT: v128.load413; CHECK: i32.load16_u414; CHECK: i32.load16_u415; CHECK: i32.sub416; CHECK: i32.store16417; CHECK: i32.load16_u418; CHECK: i32.load16_u419; CHECK: i32.sub420; CHECK: i32.store16421; CHECK: i32.load16_u422; CHECK: i32.load16_u423; CHECK: i32.sub424; CHECK: i32.store16425; CHECK: i32.load16_u426; CHECK: i32.load16_u427; CHECK: i32.sub428; CHECK: i32.store16429; CHECK: i32.load16_u430; CHECK: i32.load16_u431; CHECK: i32.sub432; CHECK: i32.store16433define hidden void @five_shorts(ptr noalias nocapture noundef writeonly %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2, i32 noundef %3) {434 %5 = icmp eq i32 %3, 0435 br i1 %5, label %6, label %7436 4376: ; preds = %7, %4438 ret void439 4407: ; preds = %4, %7441 %8 = phi i32 [ %39, %7 ], [ 0, %4 ]442 %9 = getelementptr inbounds %struct.FiveShorts, ptr %1, i32 %8443 %10 = load i16, ptr %9, align 1444 %11 = getelementptr inbounds %struct.FiveShorts, ptr %2, i32 %8445 %12 = load i16, ptr %11, align 1446 %13 = sub i16 %10, %12447 %14 = getelementptr inbounds %struct.FiveShorts, ptr %0, i32 %8448 store i16 %13, ptr %14, align 1449 %15 = getelementptr inbounds i16, ptr %9, i32 1450 %16 = load i16, ptr %15, align 1451 %17 = getelementptr inbounds i16, ptr %11, i32 1452 %18 = load i16, ptr %17, align 1453 %19 = sub i16 %16, %18454 %20 = getelementptr inbounds i16, ptr %14, i32 1455 store i16 %19, ptr %20, align 1456 %21 = getelementptr inbounds i16, ptr %9, i32 2457 %22 = load i16, ptr %21, align 1458 %23 = getelementptr inbounds i16, ptr %11, i32 2459 %24 = load i16, ptr %23, align 1460 %25 = sub i16 %22, %24461 %26 = getelementptr inbounds i16, ptr %14, i32 2462 store i16 %25, ptr %26, align 1463 %27 = getelementptr inbounds i16, ptr %9, i32 3464 %28 = load i16, ptr %27, align 1465 %29 = getelementptr inbounds i16, ptr %11, i32 3466 %30 = load i16, ptr %29, align 1467 %31 = sub i16 %28, %30468 %32 = getelementptr inbounds i16, ptr %14, i32 3469 store i16 %31, ptr %32, align 1470 %33 = getelementptr inbounds i16, ptr %9, i32 4471 %34 = load i16, ptr %33, align 1472 %35 = getelementptr inbounds i16, ptr %11, i32 4473 %36 = load i16, ptr %35, align 1474 %37 = sub i16 %34, %36475 %38 = getelementptr inbounds i16, ptr %14, i32 4476 store i16 %37, ptr %38, align 1477 %39 = add nuw i32 %8, 1478 %40 = icmp eq i32 %39, %3479 br i1 %40, label %6, label %7480}481 482; CHECK-LABEL: two_bytes_same_op:483; CHECK: loop484; CHECK: v128.load485; CHECK: v128.load486; CHECK: i8x16.shuffle 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30487; CHECK: v128.load488; CHECK: v128.load489; CHECK: i8x16.shuffle 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30490; CHECK: i16x8.extmul_high_i8x16_u491; CHECK: i8x16.shuffle 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31492; CHECK: i8x16.shuffle 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31493; CHECK: i16x8.extmul_high_i8x16_u494; CHECK: i8x16.shuffle 0, 16, 2, 18, 4, 20, 6, 22, 8, 24, 10, 26, 12, 28, 14, 30495; CHECK: v128.store496; CHECK: i16x8.extmul_low_i8x16_u497; CHECK: i16x8.extmul_low_i8x16_u498; CHECK: i8x16.shuffle 0, 16, 2, 18, 4, 20, 6, 22, 8, 24, 10, 26, 12, 28, 14, 30499; CHECK: v128.store500define hidden void @two_bytes_same_op(ptr noalias nocapture noundef writeonly %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2, i32 noundef %3) {501 %5 = icmp eq i32 %3, 0502 br i1 %5, label %6, label %7503 5046: ; preds = %7, %4505 ret void506 5077: ; preds = %4, %7508 %8 = phi i32 [ %21, %7 ], [ 0, %4 ]509 %9 = getelementptr inbounds %struct.TwoBytes, ptr %1, i32 %8510 %10 = load i8, ptr %9, align 1511 %11 = getelementptr inbounds %struct.TwoBytes, ptr %2, i32 %8512 %12 = load i8, ptr %11, align 1513 %13 = mul i8 %12, %10514 %14 = getelementptr inbounds %struct.TwoBytes, ptr %0, i32 %8515 store i8 %13, ptr %14, align 1516 %15 = getelementptr inbounds i8, ptr %9, i32 1517 %16 = load i8, ptr %15, align 1518 %17 = getelementptr inbounds i8, ptr %11, i32 1519 %18 = load i8, ptr %17, align 1520 %19 = mul i8 %18, %16521 %20 = getelementptr inbounds i8, ptr %14, i32 1522 store i8 %19, ptr %20, align 1523 %21 = add nuw i32 %8, 1524 %22 = icmp eq i32 %21, %3525 br i1 %22, label %6, label %7526}527 528; CHECK-LABEL: two_bytes_vary_op:529; CHECK: loop530; CHECK: v128.load531; CHECK: v128.load532; CHECK: i8x16.shuffle 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30533; CHECK: v128.load534; CHECK: v128.load535; CHECK: i8x16.shuffle 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30536; CHECK: i16x8.extmul_high_i8x16_u537; CHECK: i8x16.shuffle 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31538; CHECK: i8x16.shuffle 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31539; CHECK: i8x16.sub540; CHECK: i8x16.shuffle 0, 24, 2, 25, 4, 26, 6, 27, 8, 28, 10, 29, 12, 30, 14, 31541; CHECK: v128.store542; CHECK: i16x8.extmul_low_i8x16_u543; CHECK: i8x16.shuffle 0, 16, 2, 17, 4, 18, 6, 19, 8, 20, 10, 21, 12, 22, 14, 23544; CHECK: v128.store545define hidden void @two_bytes_vary_op(ptr noalias nocapture noundef writeonly %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2, i32 noundef %3) {546 %5 = icmp eq i32 %3, 0547 br i1 %5, label %6, label %7548 5496: ; preds = %7, %4550 ret void551 5527: ; preds = %4, %7553 %8 = phi i32 [ %21, %7 ], [ 0, %4 ]554 %9 = getelementptr inbounds %struct.TwoBytes, ptr %1, i32 %8555 %10 = load i8, ptr %9, align 1556 %11 = getelementptr inbounds %struct.TwoBytes, ptr %2, i32 %8557 %12 = load i8, ptr %11, align 1558 %13 = mul i8 %12, %10559 %14 = getelementptr inbounds %struct.TwoBytes, ptr %0, i32 %8560 store i8 %13, ptr %14, align 1561 %15 = getelementptr inbounds i8, ptr %9, i32 1562 %16 = load i8, ptr %15, align 1563 %17 = getelementptr inbounds i8, ptr %11, i32 1564 %18 = load i8, ptr %17, align 1565 %19 = sub i8 %16, %18566 %20 = getelementptr inbounds i8, ptr %14, i32 1567 store i8 %19, ptr %20, align 1568 %21 = add nuw i32 %8, 1569 %22 = icmp eq i32 %21, %3570 br i1 %22, label %6, label %7571}572 573; CHECK-LABEL: three_bytes_same_op:574; CHECK: loop575; CHECK: i32.load8_u576; CHECK: i32.load8_u577; CHECK: i32.and578; CHECK: i32.store8579; CHECK: i32.load8_u580; CHECK: i32.load8_u581; CHECK: i32.and582; CHECK: i32.store8583; CHECK: i32.load8_u584; CHECK: i32.load8_u585; CHECK: i32.and586; CHECK: i32.store8587define hidden void @three_bytes_same_op(ptr noalias nocapture noundef writeonly %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2, i32 noundef %3) {588 %5 = icmp eq i32 %3, 0589 br i1 %5, label %6, label %7590 5916: ; preds = %7, %4592 ret void593 5947: ; preds = %4, %7595 %8 = phi i32 [ %27, %7 ], [ 0, %4 ]596 %9 = getelementptr inbounds %struct.ThreeBytes, ptr %1, i32 %8597 %10 = load i8, ptr %9, align 1598 %11 = getelementptr inbounds %struct.ThreeBytes, ptr %2, i32 %8599 %12 = load i8, ptr %11, align 1600 %13 = and i8 %12, %10601 %14 = getelementptr inbounds %struct.ThreeBytes, ptr %0, i32 %8602 store i8 %13, ptr %14, align 1603 %15 = getelementptr inbounds i8, ptr %9, i32 1604 %16 = load i8, ptr %15, align 1605 %17 = getelementptr inbounds i8, ptr %11, i32 1606 %18 = load i8, ptr %17, align 1607 %19 = and i8 %18, %16608 %20 = getelementptr inbounds i8, ptr %14, i32 1609 store i8 %19, ptr %20, align 1610 %21 = getelementptr inbounds i8, ptr %9, i32 2611 %22 = load i8, ptr %21, align 1612 %23 = getelementptr inbounds i8, ptr %11, i32 2613 %24 = load i8, ptr %23, align 1614 %25 = and i8 %24, %22615 %26 = getelementptr inbounds i8, ptr %14, i32 2616 store i8 %25, ptr %26, align 1617 %27 = add nuw i32 %8, 1618 %28 = icmp eq i32 %27, %3619 br i1 %28, label %6, label %7620}621 622; CHECK-LABEL: three_bytes_interleave_op:623; CHECK: loop624; CHECK: i32.load8_u625; CHECK: i32.load8_u626; CHECK: i32.add627; CHECK: i32.store8628; CHECK: i32.load8_u629; CHECK: i32.load8_u630; CHECK: i32.sub631; CHECK: i32.store8632; CHECK: i32.load8_u633; CHECK: i32.load8_u634; CHECK: i32.add635; CHECK: i32.store8636define hidden void @three_bytes_interleave_op(ptr noalias nocapture noundef writeonly %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2, i32 noundef %3) {637 %5 = icmp eq i32 %3, 0638 br i1 %5, label %6, label %7639 6406: ; preds = %7, %4641 ret void642 6437: ; preds = %4, %7644 %8 = phi i32 [ %27, %7 ], [ 0, %4 ]645 %9 = getelementptr inbounds %struct.ThreeBytes, ptr %1, i32 %8646 %10 = load i8, ptr %9, align 1647 %11 = getelementptr inbounds %struct.ThreeBytes, ptr %2, i32 %8648 %12 = load i8, ptr %11, align 1649 %13 = add i8 %12, %10650 %14 = getelementptr inbounds %struct.ThreeBytes, ptr %0, i32 %8651 store i8 %13, ptr %14, align 1652 %15 = getelementptr inbounds i8, ptr %9, i32 1653 %16 = load i8, ptr %15, align 1654 %17 = getelementptr inbounds i8, ptr %11, i32 1655 %18 = load i8, ptr %17, align 1656 %19 = sub i8 %16, %18657 %20 = getelementptr inbounds i8, ptr %14, i32 1658 store i8 %19, ptr %20, align 1659 %21 = getelementptr inbounds i8, ptr %9, i32 2660 %22 = load i8, ptr %21, align 1661 %23 = getelementptr inbounds i8, ptr %11, i32 2662 %24 = load i8, ptr %23, align 1663 %25 = add i8 %24, %22664 %26 = getelementptr inbounds i8, ptr %14, i32 2665 store i8 %25, ptr %26, align 1666 %27 = add nuw i32 %8, 1667 %28 = icmp eq i32 %27, %3668 br i1 %28, label %6, label %7669}670 671; CHECK-LABEL: four_bytes_same_op:672; CHECK: loop673; CHECK: v128.load674; CHECK: v128.load675; CHECK: i8x16.shuffle 0, 4, 8, 12, 16, 20, 24, 28, 0, 0, 0, 0, 0, 0, 0, 0676; CHECK: v128.load677; CHECK: v128.load678; CHECK: i8x16.shuffle 0, 4, 8, 12, 16, 20, 24, 28, 0, 0, 0, 0, 0, 0, 0, 0679; CHECK: v128.and680; CHECK: i8x16.shuffle 1, 5, 9, 13, 17, 21, 25, 29, 0, 0, 0, 0, 0, 0, 0, 0681; CHECK: i8x16.shuffle 1, 5, 9, 13, 17, 21, 25, 29, 0, 0, 0, 0, 0, 0, 0, 0682; CHECK: v128.and683; CHECK: i8x16.shuffle 4, 20, 0, 0, 5, 21, 0, 0, 6, 22, 0, 0, 7, 23, 0, 0684; CHECK: i8x16.shuffle 2, 6, 10, 14, 18, 22, 26, 30, 0, 0, 0, 0, 0, 0, 0, 0685; CHECK: i8x16.shuffle 2, 6, 10, 14, 18, 22, 26, 30, 0, 0, 0, 0, 0, 0, 0, 0686; CHECK: v128.and687; CHECK: i8x16.shuffle 3, 7, 11, 15, 19, 23, 27, 31, 0, 0, 0, 0, 0, 0, 0, 0688; CHECK: i8x16.shuffle 3, 7, 11, 15, 19, 23, 27, 31, 0, 0, 0, 0, 0, 0, 0, 0689; CHECK: v128.and690; CHECK: i8x16.shuffle 0, 0, 4, 20, 0, 0, 5, 21, 0, 0, 6, 22, 0, 0, 7, 23691; CHECK: i8x16.shuffle 0, 1, 18, 19, 4, 5, 22, 23, 8, 9, 26, 27, 12, 13, 30, 31692; CHECK: v128.store693; CHECK: i8x16.shuffle 0, 16, 0, 0, 1, 17, 0, 0, 2, 18, 0, 0, 3, 19, 0, 0694; CHECK: i8x16.shuffle 0, 0, 0, 16, 0, 0, 1, 17, 0, 0, 2, 18, 0, 0, 3, 19695; CHECK: i8x16.shuffle 0, 1, 18, 19, 4, 5, 22, 23, 8, 9, 26, 27, 12, 13, 30, 31696; CHECK: v128.store697define hidden void @four_bytes_same_op(ptr noalias nocapture noundef writeonly %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2, i32 noundef %3) {698 %5 = icmp eq i32 %3, 0699 br i1 %5, label %6, label %7700 7016: ; preds = %7, %4702 ret void703 7047: ; preds = %4, %7705 %8 = phi i32 [ %33, %7 ], [ 0, %4 ]706 %9 = getelementptr inbounds %struct.FourBytes, ptr %1, i32 %8707 %10 = load i8, ptr %9, align 1708 %11 = getelementptr inbounds %struct.FourBytes, ptr %2, i32 %8709 %12 = load i8, ptr %11, align 1710 %13 = and i8 %12, %10711 %14 = getelementptr inbounds %struct.FourBytes, ptr %0, i32 %8712 store i8 %13, ptr %14, align 1713 %15 = getelementptr inbounds i8, ptr %9, i32 1714 %16 = load i8, ptr %15, align 1715 %17 = getelementptr inbounds i8, ptr %11, i32 1716 %18 = load i8, ptr %17, align 1717 %19 = and i8 %18, %16718 %20 = getelementptr inbounds i8, ptr %14, i32 1719 store i8 %19, ptr %20, align 1720 %21 = getelementptr inbounds i8, ptr %9, i32 2721 %22 = load i8, ptr %21, align 1722 %23 = getelementptr inbounds i8, ptr %11, i32 2723 %24 = load i8, ptr %23, align 1724 %25 = and i8 %24, %22725 %26 = getelementptr inbounds i8, ptr %14, i32 2726 store i8 %25, ptr %26, align 1727 %27 = getelementptr inbounds i8, ptr %9, i32 3728 %28 = load i8, ptr %27, align 1729 %29 = getelementptr inbounds i8, ptr %11, i32 3730 %30 = load i8, ptr %29, align 1731 %31 = and i8 %30, %28732 %32 = getelementptr inbounds i8, ptr %14, i32 3733 store i8 %31, ptr %32, align 1734 %33 = add nuw i32 %8, 1735 %34 = icmp eq i32 %33, %3736 br i1 %34, label %6, label %7737}738 739; CHECK-LABEL: four_bytes_split_op:740; CHECK: loop741; CHECK: v128.load742; CHECK: v128.load743; CHECK: i8x16.shuffle 0, 4, 8, 12, 16, 20, 24, 28, 0, 0, 0, 0, 0, 0, 0, 0744; CHECK: v128.load745; CHECK: v128.load746; CHECK: i8x16.shuffle 0, 4, 8, 12, 16, 20, 24, 28, 0, 0, 0, 0, 0, 0, 0, 0747; CHECK: i16x8.extmul_low_i8x16_u748; CHECK: i8x16.shuffle 1, 5, 9, 13, 17, 21, 25, 29, 0, 0, 0, 0, 0, 0, 0, 0749; CHECK: i8x16.shuffle 1, 5, 9, 13, 17, 21, 25, 29, 0, 0, 0, 0, 0, 0, 0, 0750; CHECK: i16x8.extmul_low_i8x16_u751; CHECK: i8x16.shuffle 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30752; CHECK: i8x16.shuffle 2, 6, 10, 14, 18, 22, 26, 30, 0, 0, 0, 0, 0, 0, 0, 0753; CHECK: i8x16.shuffle 2, 6, 10, 14, 18, 22, 26, 30, 0, 0, 0, 0, 0, 0, 0, 0754; CHECK: i8x16.sub755; CHECK: i8x16.shuffle 3, 7, 11, 15, 19, 23, 27, 31, 0, 0, 0, 0, 0, 0, 0, 0756; CHECK: i8x16.shuffle 3, 7, 11, 15, 19, 23, 27, 31, 0, 0, 0, 0, 0, 0, 0, 0757; CHECK: i8x16.sub758; CHECK: i8x16.shuffle 0, 1, 2, 3, 4, 5, 6, 7, 16, 17, 18, 19, 20, 21, 22, 23759; CHECK: i8x16.shuffle 4, 12, 20, 28, 5, 13, 21, 29, 6, 14, 22, 30, 7, 15, 23, 31760; CHECK: v128.store761; CHECK: i8x16.shuffle 0, 8, 16, 24, 1, 9, 17, 25, 2, 10, 18, 26, 3, 11, 19, 27762; CHECK: v128.store763define hidden void @four_bytes_split_op(ptr noalias nocapture noundef writeonly %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2, i32 noundef %3) {764 %5 = icmp eq i32 %3, 0765 br i1 %5, label %6, label %7766 7676: ; preds = %7, %4768 ret void769 7707: ; preds = %4, %7771 %8 = phi i32 [ %33, %7 ], [ 0, %4 ]772 %9 = getelementptr inbounds %struct.FourBytes, ptr %1, i32 %8773 %10 = load i8, ptr %9, align 1774 %11 = getelementptr inbounds %struct.FourBytes, ptr %2, i32 %8775 %12 = load i8, ptr %11, align 1776 %13 = mul i8 %12, %10777 %14 = getelementptr inbounds %struct.FourBytes, ptr %0, i32 %8778 store i8 %13, ptr %14, align 1779 %15 = getelementptr inbounds i8, ptr %9, i32 1780 %16 = load i8, ptr %15, align 1781 %17 = getelementptr inbounds i8, ptr %11, i32 1782 %18 = load i8, ptr %17, align 1783 %19 = mul i8 %18, %16784 %20 = getelementptr inbounds i8, ptr %14, i32 1785 store i8 %19, ptr %20, align 1786 %21 = getelementptr inbounds i8, ptr %9, i32 2787 %22 = load i8, ptr %21, align 1788 %23 = getelementptr inbounds i8, ptr %11, i32 2789 %24 = load i8, ptr %23, align 1790 %25 = sub i8 %22, %24791 %26 = getelementptr inbounds i8, ptr %14, i32 2792 store i8 %25, ptr %26, align 1793 %27 = getelementptr inbounds i8, ptr %9, i32 3794 %28 = load i8, ptr %27, align 1795 %29 = getelementptr inbounds i8, ptr %11, i32 3796 %30 = load i8, ptr %29, align 1797 %31 = sub i8 %28, %30798 %32 = getelementptr inbounds i8, ptr %14, i32 3799 store i8 %31, ptr %32, align 1800 %33 = add nuw i32 %8, 1801 %34 = icmp eq i32 %33, %3802 br i1 %34, label %6, label %7803}804 805; CHECK-LABEL: four_bytes_interleave_op:806; CHECK: loop807; CHECK: v128.load808; CHECK: v128.load809; CHECK: i8x16.shuffle 0, 4, 8, 12, 16, 20, 24, 28, 0, 0, 0, 0, 0, 0, 0, 0810; CHECK: v128.load811; CHECK: v128.load812; CHECK: i8x16.shuffle 0, 4, 8, 12, 16, 20, 24, 28, 0, 0, 0, 0, 0, 0, 0, 0813; CHECK: i8x16.add814; CHECK: i8x16.shuffle 1, 5, 9, 13, 17, 21, 25, 29, 0, 0, 0, 0, 0, 0, 0, 0815; CHECK: i8x16.shuffle 1, 5, 9, 13, 17, 21, 25, 29, 0, 0, 0, 0, 0, 0, 0, 0816; CHECK: i8x16.sub817; CHECK: i8x16.shuffle 4, 20, 0, 0, 5, 21, 0, 0, 6, 22, 0, 0, 7, 23, 0, 0818; CHECK: i8x16.shuffle 2, 6, 10, 14, 18, 22, 26, 30, 0, 0, 0, 0, 0, 0, 0, 0819; CHECK: i8x16.shuffle 2, 6, 10, 14, 18, 22, 26, 30, 0, 0, 0, 0, 0, 0, 0, 0820; CHECK: i8x16.add821; CHECK: i8x16.shuffle 3, 7, 11, 15, 19, 23, 27, 31, 0, 0, 0, 0, 0, 0, 0, 0822; CHECK: i8x16.shuffle 3, 7, 11, 15, 19, 23, 27, 31, 0, 0, 0, 0, 0, 0, 0, 0823; CHECK: i8x16.sub824; CHECK: i8x16.shuffle 0, 0, 4, 20, 0, 0, 5, 21, 0, 0, 6, 22, 0, 0, 7, 23825; CHECK: i8x16.shuffle 0, 1, 18, 19, 4, 5, 22, 23, 8, 9, 26, 27, 12, 13, 30, 31826; CHECK: v128.store827; CHECK: i8x16.shuffle 0, 16, 0, 0, 1, 17, 0, 0, 2, 18, 0, 0, 3, 19, 0, 0828; CHECK: i8x16.shuffle 0, 0, 0, 16, 0, 0, 1, 17, 0, 0, 2, 18, 0, 0, 3, 19829; CHECK: i8x16.shuffle 0, 1, 18, 19, 4, 5, 22, 23, 8, 9, 26, 27, 12, 13, 30, 31830; CHECK: v128.store831define hidden void @four_bytes_interleave_op(ptr noalias nocapture noundef writeonly %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2, i32 noundef %3) {832 %5 = icmp eq i32 %3, 0833 br i1 %5, label %6, label %7834 8356: ; preds = %7, %4836 ret void837 8387: ; preds = %4, %7839 %8 = phi i32 [ %33, %7 ], [ 0, %4 ]840 %9 = getelementptr inbounds %struct.FourBytes, ptr %1, i32 %8841 %10 = load i8, ptr %9, align 1842 %11 = getelementptr inbounds %struct.FourBytes, ptr %2, i32 %8843 %12 = load i8, ptr %11, align 1844 %13 = add i8 %12, %10845 %14 = getelementptr inbounds %struct.FourBytes, ptr %0, i32 %8846 store i8 %13, ptr %14, align 1847 %15 = getelementptr inbounds i8, ptr %9, i32 1848 %16 = load i8, ptr %15, align 1849 %17 = getelementptr inbounds i8, ptr %11, i32 1850 %18 = load i8, ptr %17, align 1851 %19 = sub i8 %16, %18852 %20 = getelementptr inbounds i8, ptr %14, i32 1853 store i8 %19, ptr %20, align 1854 %21 = getelementptr inbounds i8, ptr %9, i32 2855 %22 = load i8, ptr %21, align 1856 %23 = getelementptr inbounds i8, ptr %11, i32 2857 %24 = load i8, ptr %23, align 1858 %25 = add i8 %24, %22859 %26 = getelementptr inbounds i8, ptr %14, i32 2860 store i8 %25, ptr %26, align 1861 %27 = getelementptr inbounds i8, ptr %9, i32 3862 %28 = load i8, ptr %27, align 1863 %29 = getelementptr inbounds i8, ptr %11, i32 3864 %30 = load i8, ptr %29, align 1865 %31 = sub i8 %28, %30866 %32 = getelementptr inbounds i8, ptr %14, i32 3867 store i8 %31, ptr %32, align 1868 %33 = add nuw i32 %8, 1869 %34 = icmp eq i32 %33, %3870 br i1 %34, label %6, label %7871}872 873; CHECK-LABEL: eight_bytes_same_op:874; CHECK: loop875; CHECK-NOT: v128.load876; CHECK: i32.load8_u877; CHECK: i32.load8_u878; CHECK: i32.mul879; CHECK: i32.store8880; CHECK: i32.load8_u881; CHECK: i32.load8_u882; CHECK: i32.mul883; CHECK: i32.store8884; CHECK: i32.load8_u885; CHECK: i32.load8_u886; CHECK: i32.mul887; CHECK: i32.store8888; CHECK: i32.load8_u889; CHECK: i32.load8_u890; CHECK: i32.mul891; CHECK: i32.store8892; CHECK: i32.load8_u893; CHECK: i32.load8_u894; CHECK: i32.mul895; CHECK: i32.store8896; CHECK: i32.load8_u897; CHECK: i32.load8_u898; CHECK: i32.mul899; CHECK: i32.store8900; CHECK: i32.load8_u901; CHECK: i32.load8_u902; CHECK: i32.mul903; CHECK: i32.store8904; CHECK: i32.load8_u905; CHECK: i32.load8_u906; CHECK: i32.mul907; CHECK: i32.store8908define hidden void @eight_bytes_same_op(ptr noalias nocapture noundef writeonly %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2, i32 noundef %3) {909 %5 = icmp eq i32 %3, 0910 br i1 %5, label %6, label %7911 9126: ; preds = %7, %4913 ret void914 9157: ; preds = %4, %7916 %8 = phi i32 [ %57, %7 ], [ 0, %4 ]917 %9 = getelementptr inbounds %struct.EightBytes, ptr %1, i32 %8918 %10 = load i8, ptr %9, align 1919 %11 = getelementptr inbounds %struct.EightBytes, ptr %2, i32 %8920 %12 = load i8, ptr %11, align 1921 %13 = mul i8 %12, %10922 %14 = getelementptr inbounds %struct.EightBytes, ptr %0, i32 %8923 store i8 %13, ptr %14, align 1924 %15 = getelementptr inbounds i8, ptr %9, i32 1925 %16 = load i8, ptr %15, align 1926 %17 = getelementptr inbounds i8, ptr %11, i32 1927 %18 = load i8, ptr %17, align 1928 %19 = mul i8 %18, %16929 %20 = getelementptr inbounds i8, ptr %14, i32 1930 store i8 %19, ptr %20, align 1931 %21 = getelementptr inbounds i8, ptr %9, i32 2932 %22 = load i8, ptr %21, align 1933 %23 = getelementptr inbounds i8, ptr %11, i32 2934 %24 = load i8, ptr %23, align 1935 %25 = mul i8 %24, %22936 %26 = getelementptr inbounds i8, ptr %14, i32 2937 store i8 %25, ptr %26, align 1938 %27 = getelementptr inbounds i8, ptr %9, i32 3939 %28 = load i8, ptr %27, align 1940 %29 = getelementptr inbounds i8, ptr %11, i32 3941 %30 = load i8, ptr %29, align 1942 %31 = mul i8 %30, %28943 %32 = getelementptr inbounds i8, ptr %14, i32 3944 store i8 %31, ptr %32, align 1945 %33 = getelementptr inbounds i8, ptr %9, i32 4946 %34 = load i8, ptr %33, align 1947 %35 = getelementptr inbounds i8, ptr %11, i32 4948 %36 = load i8, ptr %35, align 1949 %37 = mul i8 %36, %34950 %38 = getelementptr inbounds i8, ptr %14, i32 4951 store i8 %37, ptr %38, align 1952 %39 = getelementptr inbounds i8, ptr %9, i32 5953 %40 = load i8, ptr %39, align 1954 %41 = getelementptr inbounds i8, ptr %11, i32 5955 %42 = load i8, ptr %41, align 1956 %43 = mul i8 %42, %40957 %44 = getelementptr inbounds i8, ptr %14, i32 5958 store i8 %43, ptr %44, align 1959 %45 = getelementptr inbounds i8, ptr %9, i32 6960 %46 = load i8, ptr %45, align 1961 %47 = getelementptr inbounds i8, ptr %11, i32 6962 %48 = load i8, ptr %47, align 1963 %49 = mul i8 %48, %46964 %50 = getelementptr inbounds i8, ptr %14, i32 6965 store i8 %49, ptr %50, align 1966 %51 = getelementptr inbounds i8, ptr %9, i32 7967 %52 = load i8, ptr %51, align 1968 %53 = getelementptr inbounds i8, ptr %11, i32 7969 %54 = load i8, ptr %53, align 1970 %55 = mul i8 %54, %52971 %56 = getelementptr inbounds i8, ptr %14, i32 7972 store i8 %55, ptr %56, align 1973 %57 = add nuw i32 %8, 1974 %58 = icmp eq i32 %57, %3975 br i1 %58, label %6, label %7976}977 978; CHECK-LABEL: eight_bytes_split_op:979; CHECK: loop980; CHECK-NOT: v128.load981; CHECK: i32.load8_u982; CHECK: i32.load8_u983; CHECK: i32.add984; CHECK: i32.store8985; CHECK: i32.load8_u986; CHECK: i32.load8_u987; CHECK: i32.add988; CHECK: i32.store8989; CHECK: i32.load8_u990; CHECK: i32.load8_u991; CHECK: i32.add992; CHECK: i32.store8993; CHECK: i32.load8_u994; CHECK: i32.load8_u995; CHECK: i32.add996; CHECK: i32.store8997; CHECK: i32.load8_u998; CHECK: i32.load8_u999; CHECK: i32.sub1000; CHECK: i32.store81001; CHECK: i32.load8_u1002; CHECK: i32.load8_u1003; CHECK: i32.sub1004; CHECK: i32.store81005; CHECK: i32.load8_u1006; CHECK: i32.load8_u1007; CHECK: i32.sub1008; CHECK: i32.store81009; CHECK: i32.load8_u1010; CHECK: i32.load8_u1011; CHECK: i32.sub1012; CHECK: i32.store81013define hidden void @eight_bytes_split_op(ptr noalias nocapture noundef writeonly %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2, i32 noundef %3) {1014 %5 = icmp eq i32 %3, 01015 br i1 %5, label %6, label %71016 10176: ; preds = %7, %41018 ret void1019 10207: ; preds = %4, %71021 %8 = phi i32 [ %57, %7 ], [ 0, %4 ]1022 %9 = getelementptr inbounds %struct.EightBytes, ptr %1, i32 %81023 %10 = load i8, ptr %9, align 11024 %11 = getelementptr inbounds %struct.EightBytes, ptr %2, i32 %81025 %12 = load i8, ptr %11, align 11026 %13 = add i8 %12, %101027 %14 = getelementptr inbounds %struct.EightBytes, ptr %0, i32 %81028 store i8 %13, ptr %14, align 11029 %15 = getelementptr inbounds i8, ptr %9, i32 11030 %16 = load i8, ptr %15, align 11031 %17 = getelementptr inbounds i8, ptr %11, i32 11032 %18 = load i8, ptr %17, align 11033 %19 = add i8 %18, %161034 %20 = getelementptr inbounds i8, ptr %14, i32 11035 store i8 %19, ptr %20, align 11036 %21 = getelementptr inbounds i8, ptr %9, i32 21037 %22 = load i8, ptr %21, align 11038 %23 = getelementptr inbounds i8, ptr %11, i32 21039 %24 = load i8, ptr %23, align 11040 %25 = add i8 %24, %221041 %26 = getelementptr inbounds i8, ptr %14, i32 21042 store i8 %25, ptr %26, align 11043 %27 = getelementptr inbounds i8, ptr %9, i32 31044 %28 = load i8, ptr %27, align 11045 %29 = getelementptr inbounds i8, ptr %11, i32 31046 %30 = load i8, ptr %29, align 11047 %31 = add i8 %30, %281048 %32 = getelementptr inbounds i8, ptr %14, i32 31049 store i8 %31, ptr %32, align 11050 %33 = getelementptr inbounds i8, ptr %9, i32 41051 %34 = load i8, ptr %33, align 11052 %35 = getelementptr inbounds i8, ptr %11, i32 41053 %36 = load i8, ptr %35, align 11054 %37 = sub i8 %34, %361055 %38 = getelementptr inbounds i8, ptr %14, i32 41056 store i8 %37, ptr %38, align 11057 %39 = getelementptr inbounds i8, ptr %9, i32 51058 %40 = load i8, ptr %39, align 11059 %41 = getelementptr inbounds i8, ptr %11, i32 51060 %42 = load i8, ptr %41, align 11061 %43 = sub i8 %40, %421062 %44 = getelementptr inbounds i8, ptr %14, i32 51063 store i8 %43, ptr %44, align 11064 %45 = getelementptr inbounds i8, ptr %9, i32 61065 %46 = load i8, ptr %45, align 11066 %47 = getelementptr inbounds i8, ptr %11, i32 61067 %48 = load i8, ptr %47, align 11068 %49 = sub i8 %46, %481069 %50 = getelementptr inbounds i8, ptr %14, i32 61070 store i8 %49, ptr %50, align 11071 %51 = getelementptr inbounds i8, ptr %9, i32 71072 %52 = load i8, ptr %51, align 11073 %53 = getelementptr inbounds i8, ptr %11, i32 71074 %54 = load i8, ptr %53, align 11075 %55 = sub i8 %52, %541076 %56 = getelementptr inbounds i8, ptr %14, i32 71077 store i8 %55, ptr %56, align 11078 %57 = add nuw i32 %8, 11079 %58 = icmp eq i32 %57, %31080 br i1 %58, label %6, label %71081}1082 1083; CHECK-LABEL: eight_bytes_interleave_op:1084; CHECK: loop1085; CHECK-NOT: v128.load1086; CHECK: i32.load8_u1087; CHECK: i32.load8_u1088; CHECK: i32.add1089; CHECK: i32.store81090; CHECK: i32.load8_u1091; CHECK: i32.load8_u1092; CHECK: i32.sub1093; CHECK: i32.store81094; CHECK: i32.load8_u1095; CHECK: i32.load8_u1096; CHECK: i32.add1097; CHECK: i32.store81098; CHECK: i32.load8_u1099; CHECK: i32.load8_u1100; CHECK: i32.sub1101; CHECK: i32.store81102; CHECK: i32.load8_u1103; CHECK: i32.load8_u1104; CHECK: i32.add1105; CHECK: i32.store81106; CHECK: i32.load8_u1107; CHECK: i32.load8_u1108; CHECK: i32.sub1109; CHECK: i32.store81110; CHECK: i32.load8_u1111; CHECK: i32.load8_u1112; CHECK: i32.add1113; CHECK: i32.store81114; CHECK: i32.load8_u1115; CHECK: i32.load8_u1116; CHECK: i32.sub1117; CHECK: i32.store81118define hidden void @eight_bytes_interleave_op(ptr noalias nocapture noundef writeonly %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2, i32 noundef %3) {1119 %5 = icmp eq i32 %3, 01120 br i1 %5, label %6, label %71121 11226: ; preds = %7, %41123 ret void1124 11257: ; preds = %4, %71126 %8 = phi i32 [ %57, %7 ], [ 0, %4 ]1127 %9 = getelementptr inbounds %struct.EightBytes, ptr %1, i32 %81128 %10 = load i8, ptr %9, align 11129 %11 = getelementptr inbounds %struct.EightBytes, ptr %2, i32 %81130 %12 = load i8, ptr %11, align 11131 %13 = add i8 %12, %101132 %14 = getelementptr inbounds %struct.EightBytes, ptr %0, i32 %81133 store i8 %13, ptr %14, align 11134 %15 = getelementptr inbounds i8, ptr %9, i32 11135 %16 = load i8, ptr %15, align 11136 %17 = getelementptr inbounds i8, ptr %11, i32 11137 %18 = load i8, ptr %17, align 11138 %19 = sub i8 %16, %181139 %20 = getelementptr inbounds i8, ptr %14, i32 11140 store i8 %19, ptr %20, align 11141 %21 = getelementptr inbounds i8, ptr %9, i32 21142 %22 = load i8, ptr %21, align 11143 %23 = getelementptr inbounds i8, ptr %11, i32 21144 %24 = load i8, ptr %23, align 11145 %25 = add i8 %24, %221146 %26 = getelementptr inbounds i8, ptr %14, i32 21147 store i8 %25, ptr %26, align 11148 %27 = getelementptr inbounds i8, ptr %9, i32 31149 %28 = load i8, ptr %27, align 11150 %29 = getelementptr inbounds i8, ptr %11, i32 31151 %30 = load i8, ptr %29, align 11152 %31 = sub i8 %28, %301153 %32 = getelementptr inbounds i8, ptr %14, i32 31154 store i8 %31, ptr %32, align 11155 %33 = getelementptr inbounds i8, ptr %9, i32 41156 %34 = load i8, ptr %33, align 11157 %35 = getelementptr inbounds i8, ptr %11, i32 41158 %36 = load i8, ptr %35, align 11159 %37 = add i8 %36, %341160 %38 = getelementptr inbounds i8, ptr %14, i32 41161 store i8 %37, ptr %38, align 11162 %39 = getelementptr inbounds i8, ptr %9, i32 51163 %40 = load i8, ptr %39, align 11164 %41 = getelementptr inbounds i8, ptr %11, i32 51165 %42 = load i8, ptr %41, align 11166 %43 = sub i8 %40, %421167 %44 = getelementptr inbounds i8, ptr %14, i32 51168 store i8 %43, ptr %44, align 11169 %45 = getelementptr inbounds i8, ptr %9, i32 61170 %46 = load i8, ptr %45, align 11171 %47 = getelementptr inbounds i8, ptr %11, i32 61172 %48 = load i8, ptr %47, align 11173 %49 = add i8 %48, %461174 %50 = getelementptr inbounds i8, ptr %14, i32 61175 store i8 %49, ptr %50, align 11176 %51 = getelementptr inbounds i8, ptr %9, i32 71177 %52 = load i8, ptr %51, align 11178 %53 = getelementptr inbounds i8, ptr %11, i32 71179 %54 = load i8, ptr %53, align 11180 %55 = sub i8 %52, %541181 %56 = getelementptr inbounds i8, ptr %14, i32 71182 store i8 %55, ptr %56, align 11183 %57 = add nuw i32 %8, 11184 %58 = icmp eq i32 %57, %31185 br i1 %58, label %6, label %71186}1187 1188; CHECK-LABEL: four_bytes_into_four_ints_same_op:1189; CHECK: loop1190; CHECK: i32.load8_u1191; CHECK: i32.load8_u1192; CHECK: i32.mul1193; CHECK: i32.load1194; CHECK: i32.add1195; CHECK: i32.store1196; CHECK: i32.load8_u1197; CHECK: i32.load8_u1198; CHECK: i32.mul1199; CHECK: i32.load1200; CHECK: i32.add1201; CHECK: i32.store1202; CHECK: i32.load8_u1203; CHECK: i32.load8_u1204; CHECK: i32.mul1205; CHECK: i32.load1206; CHECK: i32.add1207; CHECK: i32.store1208; CHECK: i32.load8_u1209; CHECK: i32.load8_u1210; CHECK: i32.mul1211; CHECK: i32.load1212; CHECK: i32.add1213; CHECK: i32.store1214define hidden void @four_bytes_into_four_ints_same_op(ptr noalias nocapture noundef %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2, i32 noundef %3) {1215 %5 = icmp eq i32 %3, 01216 br i1 %5, label %6, label %71217 12186: ; preds = %7, %41219 ret void1220 12217: ; preds = %4, %71222 %8 = phi i32 [ %49, %7 ], [ 0, %4 ]1223 %9 = getelementptr inbounds %struct.FourBytes, ptr %1, i32 %81224 %10 = load i8, ptr %9, align 11225 %11 = zext i8 %10 to i321226 %12 = getelementptr inbounds %struct.FourBytes, ptr %2, i32 %81227 %13 = load i8, ptr %12, align 11228 %14 = zext i8 %13 to i321229 %15 = mul nuw nsw i32 %14, %111230 %16 = getelementptr inbounds %struct.FourInts, ptr %0, i32 %81231 %17 = load i32, ptr %16, align 41232 %18 = add nsw i32 %15, %171233 store i32 %18, ptr %16, align 41234 %19 = getelementptr inbounds i8, ptr %9, i32 11235 %20 = load i8, ptr %19, align 11236 %21 = zext i8 %20 to i321237 %22 = getelementptr inbounds i8, ptr %12, i32 11238 %23 = load i8, ptr %22, align 11239 %24 = zext i8 %23 to i321240 %25 = mul nuw nsw i32 %24, %211241 %26 = getelementptr inbounds i8, ptr %16, i32 41242 %27 = load i32, ptr %26, align 41243 %28 = add nsw i32 %25, %271244 store i32 %28, ptr %26, align 41245 %29 = getelementptr inbounds i8, ptr %9, i32 21246 %30 = load i8, ptr %29, align 11247 %31 = zext i8 %30 to i321248 %32 = getelementptr inbounds i8, ptr %12, i32 21249 %33 = load i8, ptr %32, align 11250 %34 = zext i8 %33 to i321251 %35 = mul nuw nsw i32 %34, %311252 %36 = getelementptr inbounds i8, ptr %16, i32 81253 %37 = load i32, ptr %36, align 41254 %38 = add nsw i32 %35, %371255 store i32 %38, ptr %36, align 41256 %39 = getelementptr inbounds i8, ptr %9, i32 31257 %40 = load i8, ptr %39, align 11258 %41 = zext i8 %40 to i321259 %42 = getelementptr inbounds i8, ptr %12, i32 31260 %43 = load i8, ptr %42, align 11261 %44 = zext i8 %43 to i321262 %45 = mul nuw nsw i32 %44, %411263 %46 = getelementptr inbounds i8, ptr %16, i32 121264 %47 = load i32, ptr %46, align 41265 %48 = add nsw i32 %45, %471266 store i32 %48, ptr %46, align 41267 %49 = add nuw i32 %8, 11268 %50 = icmp eq i32 %49, %31269 br i1 %50, label %6, label %71270}1271 1272; CHECK-LABEL: four_bytes_into_four_ints_vary_op:1273; CHECK: loop1274; CHECK: v128.load1275; CHECK: i8x16.shuffle 0, 4, 8, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01276; CHECK: i16x8.extend_low_i8x16_u1277; CHECK: i32x4.extend_low_i16x8_u1278; CHECK: v128.load1279; CHECK: i8x16.shuffle 0, 4, 8, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01280; CHECK: i16x8.extend_low_i8x16_u1281; CHECK: i32x4.extend_low_i16x8_u1282; CHECK: i32x4.add1283; CHECK: i8x16.shuffle 1, 5, 9, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01284; CHECK: i16x8.extend_low_i8x16_u1285; CHECK: i32x4.extend_low_i16x8_u1286; CHECK: i8x16.shuffle 1, 5, 9, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01287; CHECK: i16x8.extend_low_i8x16_u1288; CHECK: i32x4.extend_low_i16x8_u1289; CHECK: i32x4.sub1290; CHECK: i8x16.shuffle 12, 13, 14, 15, 28, 29, 30, 31, 0, 1, 2, 3, 0, 1, 2, 31291; CHECK: i8x16.shuffle 2, 6, 10, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01292; CHECK: i16x8.extend_low_i8x16_u1293; CHECK: i8x16.shuffle 2, 6, 10, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01294; CHECK: i16x8.extend_low_i8x16_u1295; CHECK: i32x4.extmul_low_i16x8_u1296; CHECK: v128.and1297; CHECK: i8x16.shuffle 3, 7, 11, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01298; CHECK: i16x8.extend_low_i8x16_u1299; CHECK: i32x4.extend_low_i16x8_u1300; CHECK: i8x16.shuffle 0, 1, 2, 3, 0, 1, 2, 3, 12, 13, 14, 15, 28, 29, 30, 311301; CHECK: i8x16.shuffle 0, 1, 2, 3, 4, 5, 6, 7, 24, 25, 26, 27, 28, 29, 30, 311302; CHECK: v128.store1303; CHECK: i8x16.shuffle 8, 9, 10, 11, 24, 25, 26, 27, 0, 1, 2, 3, 0, 1, 2, 31304; CHECK: i8x16.shuffle 0, 1, 2, 3, 0, 1, 2, 3, 8, 9, 10, 11, 24, 25, 26, 271305; CHECK: i8x16.shuffle 0, 1, 2, 3, 4, 5, 6, 7, 24, 25, 26, 27, 28, 29, 30, 311306; CHECK: v128.store1307; CHECK: i8x16.shuffle 4, 5, 6, 7, 20, 21, 22, 23, 0, 1, 2, 3, 0, 1, 2, 31308; CHECK: i8x16.shuffle 0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 6, 7, 20, 21, 22, 231309; CHECK: i8x16.shuffle 0, 1, 2, 3, 4, 5, 6, 7, 24, 25, 26, 27, 28, 29, 30, 311310; CHECK: v128.store1311; CHECK: i8x16.shuffle 0, 1, 2, 3, 16, 17, 18, 19, 0, 1, 2, 3, 0, 1, 2, 31312; CHECK: i8x16.shuffle 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 16, 17, 18, 191313; CHECK: i8x16.shuffle 0, 1, 2, 3, 4, 5, 6, 7, 24, 25, 26, 27, 28, 29, 30, 311314; CHECK: v128.store1315define hidden void @four_bytes_into_four_ints_vary_op(ptr noalias nocapture noundef writeonly %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2, i32 noundef %3) {1316 %5 = icmp eq i32 %3, 01317 br i1 %5, label %6, label %71318 13196: ; preds = %7, %41320 ret void1321 13227: ; preds = %4, %71323 %8 = phi i32 [ %40, %7 ], [ 0, %4 ]1324 %9 = getelementptr inbounds %struct.FourBytes, ptr %1, i32 %81325 %10 = load i8, ptr %9, align 11326 %11 = zext i8 %10 to i321327 %12 = getelementptr inbounds %struct.FourBytes, ptr %2, i32 %81328 %13 = load i8, ptr %12, align 11329 %14 = zext i8 %13 to i321330 %15 = add nuw nsw i32 %14, %111331 %16 = getelementptr inbounds %struct.FourInts, ptr %0, i32 %81332 store i32 %15, ptr %16, align 41333 %17 = getelementptr inbounds i8, ptr %9, i32 11334 %18 = load i8, ptr %17, align 11335 %19 = zext i8 %18 to i321336 %20 = getelementptr inbounds i8, ptr %12, i32 11337 %21 = load i8, ptr %20, align 11338 %22 = zext i8 %21 to i321339 %23 = sub nsw i32 %19, %221340 %24 = getelementptr inbounds i8, ptr %16, i32 41341 store i32 %23, ptr %24, align 41342 %25 = getelementptr inbounds i8, ptr %9, i32 21343 %26 = load i8, ptr %25, align 11344 %27 = zext i8 %26 to i321345 %28 = getelementptr inbounds i8, ptr %12, i32 21346 %29 = load i8, ptr %28, align 11347 %30 = zext i8 %29 to i321348 %31 = mul nuw nsw i32 %30, %271349 %32 = getelementptr inbounds i8, ptr %16, i32 81350 store i32 %31, ptr %32, align 41351 %33 = getelementptr inbounds i8, ptr %9, i32 31352 %34 = load i8, ptr %33, align 11353 %35 = getelementptr inbounds i8, ptr %12, i32 31354 %36 = load i8, ptr %35, align 11355 %37 = and i8 %36, %341356 %38 = zext i8 %37 to i321357 %39 = getelementptr inbounds i8, ptr %16, i32 121358 store i32 %38, ptr %39, align 41359 %40 = add nuw i32 %8, 11360 %41 = icmp eq i32 %40, %31361 br i1 %41, label %6, label %71362}1363 1364; CHECK-LABEL: scale_uv_row_down2:1365; CHECK: loop1366; CHECK: v128.load1367; CHECK: v128.load1368; CHECK: i8x16.shuffle 0, 1, 4, 5, 8, 9, 12, 13, 16, 17, 20, 21, 24, 25, 28, 291369; CHECK: v128.store1370define hidden void @scale_uv_row_down2(ptr nocapture noundef readonly %0, i32 noundef %1, ptr nocapture noundef writeonly %2, i32 noundef %3) {1371 %5 = icmp sgt i32 %3, 01372 br i1 %5, label %6, label %191373 13746: ; preds = %4, %61375 %7 = phi i32 [ %17, %6 ], [ 0, %4 ]1376 %8 = phi ptr [ %15, %6 ], [ %0, %4 ]1377 %9 = phi ptr [ %16, %6 ], [ %2, %4 ]1378 %10 = getelementptr inbounds i8, ptr %8, i32 21379 %11 = load i8, ptr %10, align 11380 store i8 %11, ptr %9, align 11381 %12 = getelementptr inbounds i8, ptr %8, i32 31382 %13 = load i8, ptr %12, align 11383 %14 = getelementptr inbounds i8, ptr %9, i32 11384 store i8 %13, ptr %14, align 11385 %15 = getelementptr inbounds i8, ptr %8, i32 41386 %16 = getelementptr inbounds i8, ptr %9, i32 21387 %17 = add nuw nsw i32 %7, 11388 %18 = icmp eq i32 %17, %31389 br i1 %18, label %19, label %61390 139119: ; preds = %6, %41392 ret void1393}1394 1395; CHECK-LABEL: scale_uv_row_down2_box:1396; CHECK: loop1397; CHECK: v128.load1398; CHECK: v128.load1399; CHECK: i8x16.shuffle 0, 4, 8, 12, 16, 20, 24, 28, 0, 0, 0, 0, 0, 0, 0, 01400; CHECK: i16x8.extend_low_i8x16_u1401; CHECK: i8x16.shuffle 2, 6, 10, 14, 18, 22, 26, 30, 0, 0, 0, 0, 0, 0, 0, 01402; CHECK: i16x8.extend_low_i8x16_u1403; CHECK: i16x8.add1404; CHECK: v128.load1405; CHECK: v128.load1406; CHECK: i8x16.shuffle 0, 4, 8, 12, 16, 20, 24, 28, 0, 0, 0, 0, 0, 0, 0, 01407; CHECK: i16x8.extend_low_i8x16_u1408; CHECK: i16x8.add1409; CHECK: i8x16.shuffle 2, 6, 10, 14, 18, 22, 26, 30, 0, 0, 0, 0, 0, 0, 0, 01410; CHECK: i16x8.extend_low_i8x16_u1411; CHECK: i16x8.add1412; CHECK: i16x8.add1413; CHECK: i16x8.shr_u1414; CHECK: i8x16.shuffle 1, 5, 9, 13, 17, 21, 25, 29, 0, 0, 0, 0, 0, 0, 0, 01415; CHECK: i16x8.extend_low_i8x16_u1416; CHECK: i8x16.shuffle 3, 7, 11, 15, 19, 23, 27, 31, 0, 0, 0, 0, 0, 0, 0, 01417; CHECK: i16x8.extend_low_i8x16_u1418; CHECK: i16x8.add1419; CHECK: i8x16.shuffle 1, 5, 9, 13, 17, 21, 25, 29, 0, 0, 0, 0, 0, 0, 0, 01420; CHECK: i16x8.extend_low_i8x16_u1421; CHECK: i16x8.add1422; CHECK: i8x16.shuffle 3, 7, 11, 15, 19, 23, 27, 31, 0, 0, 0, 0, 0, 0, 0, 01423; CHECK: i16x8.extend_low_i8x16_u1424; CHECK: i16x8.add1425; CHECK: i16x8.add1426; CHECK: i16x8.shr_u1427; CHECK: i8x16.shuffle 0, 16, 2, 18, 4, 20, 6, 22, 8, 24, 10, 26, 12, 28, 14, 301428; CHECK: v128.store1429define hidden void @scale_uv_row_down2_box(ptr nocapture noundef readonly %0, i32 noundef %1, ptr nocapture noundef writeonly %2, i32 noundef %3) {1430 %5 = icmp sgt i32 %3, 01431 br i1 %5, label %6, label %541432 14336: ; preds = %41434 %7 = add nsw i32 %1, 21435 %8 = add nsw i32 %1, 11436 %9 = add nsw i32 %1, 31437 br label %101438 143910: ; preds = %6, %101440 %11 = phi i32 [ 0, %6 ], [ %52, %10 ]1441 %12 = phi ptr [ %0, %6 ], [ %50, %10 ]1442 %13 = phi ptr [ %2, %6 ], [ %51, %10 ]1443 %14 = load i8, ptr %12, align 11444 %15 = zext i8 %14 to i161445 %16 = getelementptr inbounds i8, ptr %12, i32 21446 %17 = load i8, ptr %16, align 11447 %18 = zext i8 %17 to i161448 %19 = getelementptr inbounds i8, ptr %12, i32 %11449 %20 = load i8, ptr %19, align 11450 %21 = zext i8 %20 to i161451 %22 = getelementptr inbounds i8, ptr %12, i32 %71452 %23 = load i8, ptr %22, align 11453 %24 = zext i8 %23 to i161454 %25 = add nuw nsw i16 %15, 21455 %26 = add nuw nsw i16 %25, %181456 %27 = add nuw nsw i16 %26, %211457 %28 = add nuw nsw i16 %27, %241458 %29 = lshr i16 %28, 21459 %30 = trunc nuw i16 %29 to i81460 store i8 %30, ptr %13, align 11461 %31 = getelementptr inbounds i8, ptr %12, i32 11462 %32 = load i8, ptr %31, align 11463 %33 = zext i8 %32 to i161464 %34 = getelementptr inbounds i8, ptr %12, i32 31465 %35 = load i8, ptr %34, align 11466 %36 = zext i8 %35 to i161467 %37 = getelementptr inbounds i8, ptr %12, i32 %81468 %38 = load i8, ptr %37, align 11469 %39 = zext i8 %38 to i161470 %40 = getelementptr inbounds i8, ptr %12, i32 %91471 %41 = load i8, ptr %40, align 11472 %42 = zext i8 %41 to i161473 %43 = add nuw nsw i16 %33, 21474 %44 = add nuw nsw i16 %43, %361475 %45 = add nuw nsw i16 %44, %391476 %46 = add nuw nsw i16 %45, %421477 %47 = lshr i16 %46, 21478 %48 = trunc nuw i16 %47 to i81479 %49 = getelementptr inbounds i8, ptr %13, i32 11480 store i8 %48, ptr %49, align 11481 %50 = getelementptr inbounds i8, ptr %12, i32 41482 %51 = getelementptr inbounds i8, ptr %13, i32 21483 %52 = add nuw nsw i32 %11, 11484 %53 = icmp eq i32 %52, %31485 br i1 %53, label %54, label %101486 148754: ; preds = %10, %41488 ret void1489}1490 1491; CHECK-LABEL: scale_uv_row_down2_linear:1492; CHECK: loop1493; CHECK: v128.load1494; CHECK: v128.load1495; CHECK: i8x16.shuffle 0, 4, 8, 12, 16, 20, 24, 28, 0, 0, 0, 0, 0, 0, 0, 01496; CHECK: i8x16.shuffle 2, 6, 10, 14, 18, 22, 26, 30, 0, 0, 0, 0, 0, 0, 0, 01497; CHECK: i8x16.avgr_u 1498; CHECK: i8x16.shuffle 1, 5, 9, 13, 17, 21, 25, 29, 0, 0, 0, 0, 0, 0, 0, 01499; CHECK: i8x16.shuffle 3, 7, 11, 15, 19, 23, 27, 31, 0, 0, 0, 0, 0, 0, 0, 01500; CHECK: i8x16.avgr_u 1501; CHECK: i8x16.shuffle 0, 16, 1, 17, 2, 18, 3, 19, 4, 20, 5, 21, 6, 22, 7, 231502; CHECK: v128.store1503define hidden void @scale_uv_row_down2_linear(ptr nocapture noundef readonly %0, i32 noundef %1, ptr nocapture noundef writeonly %2, i32 noundef %3) {1504 %5 = icmp sgt i32 %3, 01505 br i1 %5, label %6, label %341506 15076: ; preds = %4, %61508 %7 = phi i32 [ %32, %6 ], [ 0, %4 ]1509 %8 = phi ptr [ %30, %6 ], [ %0, %4 ]1510 %9 = phi ptr [ %31, %6 ], [ %2, %4 ]1511 %10 = load i8, ptr %8, align 11512 %11 = zext i8 %10 to i161513 %12 = getelementptr inbounds i8, ptr %8, i32 21514 %13 = load i8, ptr %12, align 11515 %14 = zext i8 %13 to i161516 %15 = add nuw nsw i16 %11, 11517 %16 = add nuw nsw i16 %15, %141518 %17 = lshr i16 %16, 11519 %18 = trunc nuw i16 %17 to i81520 store i8 %18, ptr %9, align 11521 %19 = getelementptr inbounds i8, ptr %8, i32 11522 %20 = load i8, ptr %19, align 11523 %21 = zext i8 %20 to i161524 %22 = getelementptr inbounds i8, ptr %8, i32 31525 %23 = load i8, ptr %22, align 11526 %24 = zext i8 %23 to i161527 %25 = add nuw nsw i16 %21, 11528 %26 = add nuw nsw i16 %25, %241529 %27 = lshr i16 %26, 11530 %28 = trunc nuw i16 %27 to i81531 %29 = getelementptr inbounds i8, ptr %9, i32 11532 store i8 %28, ptr %29, align 11533 %30 = getelementptr inbounds i8, ptr %8, i32 41534 %31 = getelementptr inbounds i8, ptr %9, i32 21535 %32 = add nuw nsw i32 %7, 11536 %33 = icmp eq i32 %32, %31537 br i1 %33, label %34, label %61538 153934: ; preds = %6, %41540 ret void1541}1542 1543; CHECK-LABEL: two_floats_same_op:1544; CHECK-NOT: f32x4.mul1545define hidden void @two_floats_same_op(ptr noundef readonly captures(none) %a, ptr noundef readonly captures(none) %b, ptr noundef writeonly captures(none) %res, i32 noundef %N) {1546entry:1547 %cmp21.not = icmp eq i32 %N, 01548 br i1 %cmp21.not, label %for.cond.cleanup, label %for.body1549 1550for.cond.cleanup: ; preds = %for.body, %entry1551 ret void1552 1553for.body: ; preds = %entry, %for.body1554 %i.022 = phi i32 [ %inc, %for.body ], [ 0, %entry ]1555 %arrayidx = getelementptr inbounds nuw %struct.TwoFloats, ptr %a, i32 %i.0221556 %0 = load float, ptr %arrayidx, align 41557 %arrayidx1 = getelementptr inbounds nuw %struct.TwoFloats, ptr %b, i32 %i.0221558 %1 = load float, ptr %arrayidx1, align 41559 %mul = fmul float %0, %11560 %arrayidx3 = getelementptr inbounds nuw %struct.TwoFloats, ptr %res, i32 %i.0221561 store float %mul, ptr %arrayidx3, align 41562 %y = getelementptr inbounds nuw i8, ptr %arrayidx, i32 41563 %2 = load float, ptr %y, align 41564 %y7 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 41565 %3 = load float, ptr %y7, align 41566 %mul8 = fmul float %2, %31567 %y10 = getelementptr inbounds nuw i8, ptr %arrayidx3, i32 41568 store float %mul8, ptr %y10, align 41569 %inc = add nuw i32 %i.022, 11570 %exitcond.not = icmp eq i32 %inc, %N1571 br i1 %exitcond.not, label %for.cond.cleanup, label %for.body1572}1573 1574; CHECK-LABEL: two_floats_vary_op:1575; CHECK-NOT: f32x41576define hidden void @two_floats_vary_op(ptr noundef readonly captures(none) %a, ptr noundef readonly captures(none) %b, ptr noundef writeonly captures(none) %res, i32 noundef %N) {1577entry:1578 %cmp20.not = icmp eq i32 %N, 01579 br i1 %cmp20.not, label %for.cond.cleanup, label %for.body1580 1581for.cond.cleanup: ; preds = %for.body, %entry1582 ret void1583 1584for.body: ; preds = %entry, %for.body1585 %i.021 = phi i32 [ %inc, %for.body ], [ 0, %entry ]1586 %arrayidx = getelementptr inbounds nuw %struct.TwoFloats, ptr %a, i32 %i.0211587 %0 = load float, ptr %arrayidx, align 41588 %arrayidx1 = getelementptr inbounds nuw %struct.TwoFloats, ptr %b, i32 %i.0211589 %1 = load float, ptr %arrayidx1, align 41590 %add = fadd float %0, %11591 %arrayidx3 = getelementptr inbounds nuw %struct.TwoFloats, ptr %res, i32 %i.0211592 store float %add, ptr %arrayidx3, align 41593 %y = getelementptr inbounds nuw i8, ptr %arrayidx, i32 41594 %2 = load float, ptr %y, align 41595 %y7 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 41596 %3 = load float, ptr %y7, align 41597 %sub = fsub float %2, %31598 %y9 = getelementptr inbounds nuw i8, ptr %arrayidx3, i32 41599 store float %sub, ptr %y9, align 41600 %inc = add nuw i32 %i.021, 11601 %exitcond.not = icmp eq i32 %inc, %N1602 br i1 %exitcond.not, label %for.cond.cleanup, label %for.body1603}1604 1605; CHECK-LABEL: two_bytes_two_floats_same_op:1606; CHECK: loop1607; CHECK: v128.load64_zero1608; CHECK: i8x16.shuffle 0, 2, 4, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01609; CHECK: i16x8.extend_low_i8x16_s1610; CHECK: i32x4.extend_low_i16x8_s1611; CHECK: f32x4.convert_i32x4_s1612; CHECK: v128.load64_zero1613; CHECK: i8x16.shuffle 0, 2, 4, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01614; CHECK: i16x8.extend_low_i8x16_s1615; CHECK: i32x4.extend_low_i16x8_s1616; CHECK: f32x4.convert_i32x4_s1617; CHECK: f32x4.mul1618; CHECK: i8x16.shuffle 1, 3, 5, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01619; CHECK: i16x8.extend_low_i8x16_s1620; CHECK: i32x4.extend_low_i16x8_s1621; CHECK: f32x4.convert_i32x4_s1622; CHECK: i8x16.shuffle 1, 3, 5, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01623; CHECK: i16x8.extend_low_i8x16_s1624; CHECK: i32x4.extend_low_i16x8_s1625; CHECK: f32x4.convert_i32x4_s 1626; CHECK: f32x4.mul1627; CHECK: i8x16.shuffle 8, 9, 10, 11, 24, 25, 26, 27, 12, 13, 14, 15, 28, 29, 30, 311628; CHECK: v128.store1629; CHECK: i8x16.shuffle 0, 1, 2, 3, 16, 17, 18, 19, 4, 5, 6, 7, 20, 21, 22, 231630; CHECK: v128.store1631define hidden void @two_bytes_two_floats_same_op(ptr noundef readonly captures(none) %a, ptr noundef readonly captures(none) %b, ptr noundef writeonly captures(none) %res, i32 noundef %N) {1632entry:1633 %cmp24.not = icmp eq i32 %N, 01634 br i1 %cmp24.not, label %for.cond.cleanup, label %for.body1635 1636for.cond.cleanup: ; preds = %for.body, %entry1637 ret void1638 1639for.body: ; preds = %entry, %for.body1640 %i.025 = phi i32 [ %inc, %for.body ], [ 0, %entry ]1641 %arrayidx = getelementptr inbounds nuw %struct.TwoBytes, ptr %a, i32 %i.0251642 %0 = load i8, ptr %arrayidx, align 11643 %conv = sitofp i8 %0 to float1644 %arrayidx1 = getelementptr inbounds nuw %struct.TwoBytes, ptr %b, i32 %i.0251645 %1 = load i8, ptr %arrayidx1, align 11646 %conv3 = sitofp i8 %1 to float1647 %mul = fmul float %conv, %conv31648 %arrayidx4 = getelementptr inbounds nuw %struct.TwoFloats, ptr %res, i32 %i.0251649 store float %mul, ptr %arrayidx4, align 41650 %y = getelementptr inbounds nuw i8, ptr %arrayidx, i32 11651 %2 = load i8, ptr %y, align 11652 %conv7 = sitofp i8 %2 to float1653 %y9 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 11654 %3 = load i8, ptr %y9, align 11655 %conv10 = sitofp i8 %3 to float1656 %mul11 = fmul float %conv7, %conv101657 %y13 = getelementptr inbounds nuw i8, ptr %arrayidx4, i32 41658 store float %mul11, ptr %y13, align 41659 %inc = add nuw i32 %i.025, 11660 %exitcond.not = icmp eq i32 %inc, %N1661 br i1 %exitcond.not, label %for.cond.cleanup, label %for.body1662}1663 1664; CHECK-LABEL: two_bytes_two_floats_vary_op:1665; CHECK: v128.load64_zero1666; CHECK: i8x16.shuffle 0, 2, 4, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01667; CHECK: i16x8.extend_low_i8x16_s1668; CHECK: i32x4.extend_low_i16x8_s1669; CHECK: f32x4.convert_i32x4_s1670; CHECK: v128.load64_zero1671; CHECK: i8x16.shuffle 0, 2, 4, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01672; CHECK: i16x8.extend_low_i8x16_s1673; CHECK: i32x4.extend_low_i16x8_s1674; CHECK: f32x4.convert_i32x4_s1675; CHECK: f32x4.add1676; CHECK: i8x16.shuffle 1, 3, 5, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01677; CHECK: i16x8.extend_low_i8x16_s1678; CHECK: i32x4.extend_low_i16x8_s1679; CHECK: f32x4.convert_i32x4_s1680; CHECK: i8x16.shuffle 1, 3, 5, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01681; CHECK: i16x8.extend_low_i8x16_s1682; CHECK: i32x4.extend_low_i16x8_s1683; CHECK: f32x4.convert_i32x4_s1684; CHECK: f32x4.sub1685; CHECK: i8x16.shuffle 8, 9, 10, 11, 24, 25, 26, 27, 12, 13, 14, 15, 28, 29, 30, 311686; CHECK: v128.store1687; CHECK: i8x16.shuffle 0, 1, 2, 3, 16, 17, 18, 19, 4, 5, 6, 7, 20, 21, 22, 231688; CHECK: v128.store1689define hidden void @two_bytes_two_floats_vary_op(ptr noundef readonly captures(none) %a, ptr noundef readonly captures(none) %b, ptr noundef writeonly captures(none) %res, i32 noundef %N) {1690entry:1691 %cmp23.not = icmp eq i32 %N, 01692 br i1 %cmp23.not, label %for.cond.cleanup, label %for.body1693 1694for.cond.cleanup: ; preds = %for.body, %entry1695 ret void1696 1697for.body: ; preds = %entry, %for.body1698 %i.024 = phi i32 [ %inc, %for.body ], [ 0, %entry ]1699 %arrayidx = getelementptr inbounds nuw %struct.TwoBytes, ptr %a, i32 %i.0241700 %0 = load i8, ptr %arrayidx, align 11701 %conv = sitofp i8 %0 to float1702 %arrayidx1 = getelementptr inbounds nuw %struct.TwoBytes, ptr %b, i32 %i.0241703 %1 = load i8, ptr %arrayidx1, align 11704 %conv3 = sitofp i8 %1 to float1705 %add = fadd float %conv, %conv31706 %arrayidx4 = getelementptr inbounds nuw %struct.TwoFloats, ptr %res, i32 %i.0241707 store float %add, ptr %arrayidx4, align 41708 %y = getelementptr inbounds nuw i8, ptr %arrayidx, i32 11709 %2 = load i8, ptr %y, align 11710 %conv7 = sitofp i8 %2 to float1711 %y9 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 11712 %3 = load i8, ptr %y9, align 11713 %conv10 = sitofp i8 %3 to float1714 %sub = fsub float %conv7, %conv101715 %y12 = getelementptr inbounds nuw i8, ptr %arrayidx4, i32 41716 store float %sub, ptr %y12, align 41717 %inc = add nuw i32 %i.024, 11718 %exitcond.not = icmp eq i32 %inc, %N1719 br i1 %exitcond.not, label %for.cond.cleanup, label %for.body1720}1721 1722; CHECK-LABEL: two_floats_two_bytes_same_op:1723; CHECK-NOT: v128.load1724define hidden void @two_floats_two_bytes_same_op(ptr noundef readonly captures(none) %a, ptr noundef readonly captures(none) %b, ptr noundef writeonly captures(none) %res, i32 noundef %N) {1725entry:1726 %cmp22.not = icmp eq i32 %N, 01727 br i1 %cmp22.not, label %for.cond.cleanup, label %for.body1728 1729for.cond.cleanup: ; preds = %for.body, %entry1730 ret void1731 1732for.body: ; preds = %entry, %for.body1733 %i.023 = phi i32 [ %inc, %for.body ], [ 0, %entry ]1734 %arrayidx = getelementptr inbounds nuw %struct.TwoFloats, ptr %a, i32 %i.0231735 %0 = load float, ptr %arrayidx, align 41736 %arrayidx1 = getelementptr inbounds nuw %struct.TwoFloats, ptr %b, i32 %i.0231737 %1 = load float, ptr %arrayidx1, align 41738 %mul = fmul float %0, %11739 %conv = fptosi float %mul to i81740 %arrayidx3 = getelementptr inbounds nuw %struct.TwoBytes, ptr %res, i32 %i.0231741 store i8 %conv, ptr %arrayidx3, align 11742 %y = getelementptr inbounds nuw i8, ptr %arrayidx, i32 41743 %2 = load float, ptr %y, align 41744 %y7 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 41745 %3 = load float, ptr %y7, align 41746 %mul8 = fmul float %2, %31747 %conv9 = fptosi float %mul8 to i81748 %y11 = getelementptr inbounds nuw i8, ptr %arrayidx3, i32 11749 store i8 %conv9, ptr %y11, align 11750 %inc = add nuw i32 %i.023, 11751 %exitcond.not = icmp eq i32 %inc, %N1752 br i1 %exitcond.not, label %for.cond.cleanup, label %for.body1753}1754 1755; CHECK-LABEL: two_floats_two_bytes_vary_op:1756; CHECK-NOT: v128.load1757define hidden void @two_floats_two_bytes_vary_op(ptr noundef readonly captures(none) %a, ptr noundef readonly captures(none) %b, ptr noundef writeonly captures(none) %res, i32 noundef %N) {1758entry:1759 %cmp21.not = icmp eq i32 %N, 01760 br i1 %cmp21.not, label %for.cond.cleanup, label %for.body1761 1762for.cond.cleanup: ; preds = %for.body, %entry1763 ret void1764 1765for.body: ; preds = %entry, %for.body1766 %i.022 = phi i32 [ %inc, %for.body ], [ 0, %entry ]1767 %arrayidx = getelementptr inbounds nuw %struct.TwoFloats, ptr %a, i32 %i.0221768 %0 = load float, ptr %arrayidx, align 41769 %arrayidx1 = getelementptr inbounds nuw %struct.TwoFloats, ptr %b, i32 %i.0221770 %1 = load float, ptr %arrayidx1, align 41771 %add = fadd float %0, %11772 %conv = fptosi float %add to i81773 %arrayidx3 = getelementptr inbounds nuw %struct.TwoBytes, ptr %res, i32 %i.0221774 store i8 %conv, ptr %arrayidx3, align 11775 %y = getelementptr inbounds nuw i8, ptr %arrayidx, i32 41776 %2 = load float, ptr %y, align 41777 %y7 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 41778 %3 = load float, ptr %y7, align 41779 %sub = fsub float %2, %31780 %conv8 = fptosi float %sub to i81781 %y10 = getelementptr inbounds nuw i8, ptr %arrayidx3, i32 11782 store i8 %conv8, ptr %y10, align 11783 %inc = add nuw i32 %i.022, 11784 %exitcond.not = icmp eq i32 %inc, %N1785 br i1 %exitcond.not, label %for.cond.cleanup, label %for.body1786}1787 1788; CHECK-LABEL: two_shorts_two_floats_same_op:1789; CHECK: loop1790; CHECK: v128.load1791; CHECK: i8x16.shuffle 0, 1, 4, 5, 8, 9, 12, 13, 0, 1, 0, 1, 0, 1, 0, 11792; CHECK: i32x4.extend_low_i16x8_s1793; CHECK: f32x4.convert_i32x4_s1794; CHECK: v128.load1795; CHECK: i8x16.shuffle 0, 1, 4, 5, 8, 9, 12, 13, 0, 1, 0, 1, 0, 1, 0, 11796; CHECK: i32x4.extend_low_i16x8_s1797; CHECK: f32x4.convert_i32x4_s1798; CHECK: f32x4.mul1799; CHECK: i8x16.shuffle 2, 3, 6, 7, 10, 11, 14, 15, 0, 1, 0, 1, 0, 1, 0, 11800; CHECK: i32x4.extend_low_i16x8_s1801; CHECK: f32x4.convert_i32x4_s1802; CHECK: i8x16.shuffle 2, 3, 6, 7, 10, 11, 14, 15, 0, 1, 0, 1, 0, 1, 0, 11803; CHECK: i32x4.extend_low_i16x8_s1804; CHECK: f32x4.convert_i32x4_s1805; CHECK: f32x4.mul1806; CHECK: i8x16.shuffle 8, 9, 10, 11, 24, 25, 26, 27, 12, 13, 14, 15, 28, 29, 30, 311807; CHECK: v128.store1808; CHECK: i8x16.shuffle 0, 1, 2, 3, 16, 17, 18, 19, 4, 5, 6, 7, 20, 21, 22, 231809; CHECK: v128.store1810define hidden void @two_shorts_two_floats_same_op(ptr noundef readonly captures(none) %a, ptr noundef readonly captures(none) %b, ptr noundef writeonly captures(none) %res, i32 noundef %N) {1811entry:1812 %cmp24.not = icmp eq i32 %N, 01813 br i1 %cmp24.not, label %for.cond.cleanup, label %for.body1814 1815for.cond.cleanup: ; preds = %for.body, %entry1816 ret void1817 1818for.body: ; preds = %entry, %for.body1819 %i.025 = phi i32 [ %inc, %for.body ], [ 0, %entry ]1820 %arrayidx = getelementptr inbounds nuw %struct.TwoShorts, ptr %a, i32 %i.0251821 %0 = load i16, ptr %arrayidx, align 21822 %conv = sitofp i16 %0 to float1823 %arrayidx1 = getelementptr inbounds nuw %struct.TwoShorts, ptr %b, i32 %i.0251824 %1 = load i16, ptr %arrayidx1, align 21825 %conv3 = sitofp i16 %1 to float1826 %mul = fmul float %conv, %conv31827 %arrayidx4 = getelementptr inbounds nuw %struct.TwoFloats, ptr %res, i32 %i.0251828 store float %mul, ptr %arrayidx4, align 41829 %y = getelementptr inbounds nuw i8, ptr %arrayidx, i32 21830 %2 = load i16, ptr %y, align 21831 %conv7 = sitofp i16 %2 to float1832 %y9 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 21833 %3 = load i16, ptr %y9, align 21834 %conv10 = sitofp i16 %3 to float1835 %mul11 = fmul float %conv7, %conv101836 %y13 = getelementptr inbounds nuw i8, ptr %arrayidx4, i32 41837 store float %mul11, ptr %y13, align 41838 %inc = add nuw i32 %i.025, 11839 %exitcond.not = icmp eq i32 %inc, %N1840 br i1 %exitcond.not, label %for.cond.cleanup, label %for.body1841}1842 1843; CHECK-LABEL: two_shorts_two_floats_vary_op:1844; CHECK: loop1845; CHECK: v128.load1846; CHECK: i8x16.shuffle 0, 1, 4, 5, 8, 9, 12, 13, 0, 1, 0, 1, 0, 1, 0, 11847; CHECK: i32x4.extend_low_i16x8_s1848; CHECK: f32x4.convert_i32x4_s1849; CHECK: v128.load1850; CHECK: i8x16.shuffle 0, 1, 4, 5, 8, 9, 12, 13, 0, 1, 0, 1, 0, 1, 0, 11851; CHECK: i32x4.extend_low_i16x8_s1852; CHECK: f32x4.convert_i32x4_s1853; CHECK: f32x4.add1854; CHECK: i8x16.shuffle 2, 3, 6, 7, 10, 11, 14, 15, 0, 1, 0, 1, 0, 1, 0, 11855; CHECK: i32x4.extend_low_i16x8_s1856; CHECK: f32x4.convert_i32x4_s1857; CHECK: i8x16.shuffle 2, 3, 6, 7, 10, 11, 14, 15, 0, 1, 0, 1, 0, 1, 0, 11858; CHECK: i32x4.extend_low_i16x8_s1859; CHECK: f32x4.convert_i32x4_s1860; CHECK: f32x4.sub1861; CHECK: i8x16.shuffle 8, 9, 10, 11, 24, 25, 26, 27, 12, 13, 14, 15, 28, 29, 30, 311862; CHECK: v128.store1863; CHECK: i8x16.shuffle 0, 1, 2, 3, 16, 17, 18, 19, 4, 5, 6, 7, 20, 21, 22, 231864; CHECK: v128.store1865define hidden void @two_shorts_two_floats_vary_op(ptr noundef readonly captures(none) %a, ptr noundef readonly captures(none) %b, ptr noundef writeonly captures(none) %res, i32 noundef %N) {1866entry:1867 %cmp23.not = icmp eq i32 %N, 01868 br i1 %cmp23.not, label %for.cond.cleanup, label %for.body1869 1870for.cond.cleanup: ; preds = %for.body, %entry1871 ret void1872 1873for.body: ; preds = %entry, %for.body1874 %i.024 = phi i32 [ %inc, %for.body ], [ 0, %entry ]1875 %arrayidx = getelementptr inbounds nuw %struct.TwoShorts, ptr %a, i32 %i.0241876 %0 = load i16, ptr %arrayidx, align 21877 %conv = sitofp i16 %0 to float1878 %arrayidx1 = getelementptr inbounds nuw %struct.TwoShorts, ptr %b, i32 %i.0241879 %1 = load i16, ptr %arrayidx1, align 21880 %conv3 = sitofp i16 %1 to float1881 %add = fadd float %conv, %conv31882 %arrayidx4 = getelementptr inbounds nuw %struct.TwoFloats, ptr %res, i32 %i.0241883 store float %add, ptr %arrayidx4, align 41884 %y = getelementptr inbounds nuw i8, ptr %arrayidx, i32 21885 %2 = load i16, ptr %y, align 21886 %conv7 = sitofp i16 %2 to float1887 %y9 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 21888 %3 = load i16, ptr %y9, align 21889 %conv10 = sitofp i16 %3 to float1890 %sub = fsub float %conv7, %conv101891 %y12 = getelementptr inbounds nuw i8, ptr %arrayidx4, i32 41892 store float %sub, ptr %y12, align 41893 %inc = add nuw i32 %i.024, 11894 %exitcond.not = icmp eq i32 %inc, %N1895 br i1 %exitcond.not, label %for.cond.cleanup, label %for.body1896}1897 1898; CHECK-LABEL: two_floats_two_shorts_same_op:1899; CHECK: loop1900; CHECK: v128.load1901; CHECK: v128.load1902; CHECK: i8x16.shuffle 0, 1, 2, 3, 8, 9, 10, 11, 16, 17, 18, 19, 24, 25, 26, 271903; CHECK: v128.load1904; CHECK: v128.load1905; CHECK: i8x16.shuffle 0, 1, 2, 3, 8, 9, 10, 11, 16, 17, 18, 19, 24, 25, 26, 271906; CHECK: f32x4.mul1907; CHECK: i32x4.trunc_sat_f32x4_s1908; CHECK: v128.const 65535, 65535, 65535, 655351909; CHECK: v128.and1910; CHECK: i16x8.narrow_i32x4_u1911; CHECK: i8x16.shuffle 4, 5, 6, 7, 12, 13, 14, 15, 20, 21, 22, 23, 28, 29, 30, 311912; CHECK: i8x16.shuffle 4, 5, 6, 7, 12, 13, 14, 15, 20, 21, 22, 23, 28, 29, 30, 311913; CHECK: f32x4.mul1914; CHECK: i32x4.trunc_sat_f32x4_s1915; CHECK: v128.and1916; CHECK: i16x8.narrow_i32x4_u1917; CHECK: i8x16.shuffle 0, 1, 16, 17, 2, 3, 18, 19, 4, 5, 20, 21, 6, 7, 22, 231918; CHECK: v128.store1919define hidden void @two_floats_two_shorts_same_op(ptr noundef readonly captures(none) %a, ptr noundef readonly captures(none) %b, ptr noundef writeonly captures(none) %res, i32 noundef %N) {1920entry:1921 %cmp22.not = icmp eq i32 %N, 01922 br i1 %cmp22.not, label %for.cond.cleanup, label %for.body1923 1924for.cond.cleanup: ; preds = %for.body, %entry1925 ret void1926 1927for.body: ; preds = %entry, %for.body1928 %i.023 = phi i32 [ %inc, %for.body ], [ 0, %entry ]1929 %arrayidx = getelementptr inbounds nuw %struct.TwoFloats, ptr %a, i32 %i.0231930 %0 = load float, ptr %arrayidx, align 41931 %arrayidx1 = getelementptr inbounds nuw %struct.TwoFloats, ptr %b, i32 %i.0231932 %1 = load float, ptr %arrayidx1, align 41933 %mul = fmul float %0, %11934 %conv = fptosi float %mul to i161935 %arrayidx3 = getelementptr inbounds nuw %struct.TwoShorts, ptr %res, i32 %i.0231936 store i16 %conv, ptr %arrayidx3, align 21937 %y = getelementptr inbounds nuw i8, ptr %arrayidx, i32 41938 %2 = load float, ptr %y, align 41939 %y7 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 41940 %3 = load float, ptr %y7, align 41941 %mul8 = fmul float %2, %31942 %conv9 = fptosi float %mul8 to i161943 %y11 = getelementptr inbounds nuw i8, ptr %arrayidx3, i32 21944 store i16 %conv9, ptr %y11, align 21945 %inc = add nuw i32 %i.023, 11946 %exitcond.not = icmp eq i32 %inc, %N1947 br i1 %exitcond.not, label %for.cond.cleanup, label %for.body1948}1949 1950; CHECK-LABEL: two_floats_two_shorts_vary_op:1951; CHECK: loop1952; CHECK: v128.load1953; CHECK: v128.load1954; CHECK: i8x16.shuffle 0, 1, 2, 3, 8, 9, 10, 11, 16, 17, 18, 19, 24, 25, 26, 271955; CHECK: v128.load1956; CHECK: v128.load1957; CHECK: i8x16.shuffle 0, 1, 2, 3, 8, 9, 10, 11, 16, 17, 18, 19, 24, 25, 26, 271958; CHECK: f32x4.add1959; CHECK: i32x4.trunc_sat_f32x4_s1960; CHECK: v128.const 65535, 65535, 65535, 655351961; CHECK: v128.and1962; CHECK: i16x8.narrow_i32x4_u1963; CHECK: i8x16.shuffle 4, 5, 6, 7, 12, 13, 14, 15, 20, 21, 22, 23, 28, 29, 30, 311964; CHECK: i8x16.shuffle 4, 5, 6, 7, 12, 13, 14, 15, 20, 21, 22, 23, 28, 29, 30, 311965; CHECK: f32x4.sub1966; CHECK: i32x4.trunc_sat_f32x4_s1967; CHECK: v128.and1968; CHECK: i16x8.narrow_i32x4_u1969; CHECK: i8x16.shuffle 0, 1, 16, 17, 2, 3, 18, 19, 4, 5, 20, 21, 6, 7, 22, 231970; CHECK: v128.store1971define hidden void @two_floats_two_shorts_vary_op(ptr noundef readonly captures(none) %a, ptr noundef readonly captures(none) %b, ptr noundef writeonly captures(none) %res, i32 noundef %N) {1972entry:1973 %cmp21.not = icmp eq i32 %N, 01974 br i1 %cmp21.not, label %for.cond.cleanup, label %for.body1975 1976for.cond.cleanup: ; preds = %for.body, %entry1977 ret void1978 1979for.body: ; preds = %entry, %for.body1980 %i.022 = phi i32 [ %inc, %for.body ], [ 0, %entry ]1981 %arrayidx = getelementptr inbounds nuw %struct.TwoFloats, ptr %a, i32 %i.0221982 %0 = load float, ptr %arrayidx, align 41983 %arrayidx1 = getelementptr inbounds nuw %struct.TwoFloats, ptr %b, i32 %i.0221984 %1 = load float, ptr %arrayidx1, align 41985 %add = fadd float %0, %11986 %conv = fptosi float %add to i161987 %arrayidx3 = getelementptr inbounds nuw %struct.TwoShorts, ptr %res, i32 %i.0221988 store i16 %conv, ptr %arrayidx3, align 21989 %y = getelementptr inbounds nuw i8, ptr %arrayidx, i32 41990 %2 = load float, ptr %y, align 41991 %y7 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 41992 %3 = load float, ptr %y7, align 41993 %sub = fsub float %2, %31994 %conv8 = fptosi float %sub to i161995 %y10 = getelementptr inbounds nuw i8, ptr %arrayidx3, i32 21996 store i16 %conv8, ptr %y10, align 21997 %inc = add nuw i32 %i.022, 11998 %exitcond.not = icmp eq i32 %inc, %N1999 br i1 %exitcond.not, label %for.cond.cleanup, label %for.body2000}2001 2002; CHECK-LABEL: four_floats_same_op:2003; CHECK: loop2004; CHECK-NOT: v128.load2005define hidden void @four_floats_same_op(ptr noundef readonly captures(none) %a, ptr noundef readonly captures(none) %b, ptr noundef writeonly captures(none) %res, i32 noundef %N) {2006entry:2007 %cmp45.not = icmp eq i32 %N, 02008 br i1 %cmp45.not, label %for.cond.cleanup, label %for.body2009 2010for.cond.cleanup: ; preds = %for.body, %entry2011 ret void2012 2013for.body: ; preds = %entry, %for.body2014 %i.046 = phi i32 [ %inc, %for.body ], [ 0, %entry ]2015 %arrayidx = getelementptr inbounds nuw %struct.FourFloats, ptr %a, i32 %i.0462016 %0 = load float, ptr %arrayidx, align 42017 %arrayidx1 = getelementptr inbounds nuw %struct.FourFloats, ptr %b, i32 %i.0462018 %1 = load float, ptr %arrayidx1, align 42019 %mul = fmul float %0, %12020 %arrayidx3 = getelementptr inbounds nuw %struct.FourFloats, ptr %res, i32 %i.0462021 store float %mul, ptr %arrayidx3, align 42022 %y = getelementptr inbounds nuw i8, ptr %arrayidx, i32 42023 %2 = load float, ptr %y, align 42024 %y7 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 42025 %3 = load float, ptr %y7, align 42026 %mul8 = fmul float %2, %32027 %y10 = getelementptr inbounds nuw i8, ptr %arrayidx3, i32 42028 store float %mul8, ptr %y10, align 42029 %z = getelementptr inbounds nuw i8, ptr %arrayidx, i32 82030 %4 = load float, ptr %z, align 42031 %z13 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 82032 %5 = load float, ptr %z13, align 42033 %mul14 = fmul float %4, %52034 %z16 = getelementptr inbounds nuw i8, ptr %arrayidx3, i32 82035 store float %mul14, ptr %z16, align 42036 %w = getelementptr inbounds nuw i8, ptr %arrayidx, i32 122037 %6 = load float, ptr %w, align 42038 %w19 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 122039 %7 = load float, ptr %w19, align 42040 %mul20 = fmul float %6, %72041 %w22 = getelementptr inbounds nuw i8, ptr %arrayidx3, i32 122042 store float %mul20, ptr %w22, align 42043 %inc = add nuw i32 %i.046, 12044 %exitcond.not = icmp eq i32 %inc, %N2045 br i1 %exitcond.not, label %for.cond.cleanup, label %for.body2046}2047 2048; CHECK-LABEL: four_floats_vary_op:2049; CHECK-NOT: f32x42050define hidden void @four_floats_vary_op(ptr noundef readonly captures(none) %a, ptr noundef readonly captures(none) %b, ptr noundef writeonly captures(none) %res, i32 noundef %N) {2051entry:2052 %cmp42.not = icmp eq i32 %N, 02053 br i1 %cmp42.not, label %for.cond.cleanup, label %for.body2054 2055for.cond.cleanup: ; preds = %for.body, %entry2056 ret void2057 2058for.body: ; preds = %entry, %for.body2059 %i.043 = phi i32 [ %inc, %for.body ], [ 0, %entry ]2060 %arrayidx = getelementptr inbounds nuw %struct.FourFloats, ptr %a, i32 %i.0432061 %0 = load float, ptr %arrayidx, align 42062 %arrayidx1 = getelementptr inbounds nuw %struct.FourFloats, ptr %b, i32 %i.0432063 %1 = load float, ptr %arrayidx1, align 42064 %add = fadd float %0, %12065 %arrayidx3 = getelementptr inbounds nuw %struct.FourFloats, ptr %res, i32 %i.0432066 store float %add, ptr %arrayidx3, align 42067 %y = getelementptr inbounds nuw i8, ptr %arrayidx, i32 42068 %2 = load float, ptr %y, align 42069 %y7 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 42070 %3 = load float, ptr %y7, align 42071 %sub = fsub float %2, %32072 %y9 = getelementptr inbounds nuw i8, ptr %arrayidx3, i32 42073 store float %sub, ptr %y9, align 42074 %z = getelementptr inbounds nuw i8, ptr %arrayidx, i32 82075 %4 = load float, ptr %z, align 42076 %z12 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 82077 %5 = load float, ptr %z12, align 42078 %mul = fmul float %4, %52079 %z14 = getelementptr inbounds nuw i8, ptr %arrayidx3, i32 82080 store float %mul, ptr %z14, align 42081 %w = getelementptr inbounds nuw i8, ptr %arrayidx, i32 122082 %6 = load float, ptr %w, align 42083 %w17 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 122084 %7 = load float, ptr %w17, align 42085 %div = fdiv float %6, %72086 %w19 = getelementptr inbounds nuw i8, ptr %arrayidx3, i32 122087 store float %div, ptr %w19, align 42088 %inc = add nuw i32 %i.043, 12089 %exitcond.not = icmp eq i32 %inc, %N2090 br i1 %exitcond.not, label %for.cond.cleanup, label %for.body2091}2092 2093; CHECK-LABEL: four_bytes_four_floats_same_op:2094; CHECK: loop2095; CHECK: v128.load2096; CHECK: i8x16.shuffle 0, 4, 8, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02097; CHECK: i16x8.extend_low_i8x16_s2098; CHECK: i32x4.extend_low_i16x8_s2099; CHECK: f32x4.convert_i32x4_s2100; CHECK: v128.load2101; CHECK: i8x16.shuffle 0, 4, 8, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02102; CHECK: i16x8.extend_low_i8x16_s2103; CHECK: i32x4.extend_low_i16x8_s2104; CHECK: f32x4.convert_i32x4_s2105; CHECK: f32x4.mul2106; CHECK: i8x16.shuffle 1, 5, 9, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02107; CHECK: i16x8.extend_low_i8x16_s2108; CHECK: i32x4.extend_low_i16x8_s2109; CHECK: f32x4.convert_i32x4_s2110; CHECK: i8x16.shuffle 1, 5, 9, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02111; CHECK: i16x8.extend_low_i8x16_s2112; CHECK: i32x4.extend_low_i16x8_s2113; CHECK: f32x4.convert_i32x4_s2114; CHECK: f32x4.mul2115; CHECK: i8x16.shuffle 12, 13, 14, 15, 28, 29, 30, 31, 0, 1, 2, 3, 0, 1, 2, 32116; CHECK: i8x16.shuffle 2, 6, 10, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02117; CHECK: i16x8.extend_low_i8x16_s2118; CHECK: i32x4.extend_low_i16x8_s2119; CHECK: f32x4.convert_i32x4_s2120; CHECK: i8x16.shuffle 2, 6, 10, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02121; CHECK: i16x8.extend_low_i8x16_s2122; CHECK: i32x4.extend_low_i16x8_s2123; CHECK: f32x4.convert_i32x4_s2124; CHECK: f32x4.mul2125; CHECK: i8x16.shuffle 3, 7, 11, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02126; CHECK: i16x8.extend_low_i8x16_s2127; CHECK: i32x4.extend_low_i16x8_s2128; CHECK: f32x4.convert_i32x4_s2129; CHECK: i8x16.shuffle 3, 7, 11, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02130; CHECK: i16x8.extend_low_i8x16_s2131; CHECK: i32x4.extend_low_i16x8_s2132; CHECK: f32x4.convert_i32x4_s2133; CHECK: f32x4.mul2134; CHECK: i8x16.shuffle 0, 1, 2, 3, 0, 1, 2, 3, 12, 13, 14, 15, 28, 29, 30, 312135; CHECK: i8x16.shuffle 0, 1, 2, 3, 4, 5, 6, 7, 24, 25, 26, 27, 28, 29, 30, 312136; CHECK: v128.store2137; CHECK: i8x16.shuffle 8, 9, 10, 11, 24, 25, 26, 27, 0, 1, 2, 3, 0, 1, 2, 32138; CHECK: i8x16.shuffle 0, 1, 2, 3, 0, 1, 2, 3, 8, 9, 10, 11, 24, 25, 26, 272139; CHECK: i8x16.shuffle 0, 1, 2, 3, 4, 5, 6, 7, 24, 25, 26, 27, 28, 29, 30, 312140; CHECK: v128.store2141; CHECK: i8x16.shuffle 4, 5, 6, 7, 20, 21, 22, 23, 0, 1, 2, 3, 0, 1, 2, 32142; CHECK: i8x16.shuffle 0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 6, 7, 20, 21, 22, 232143; CHECK: i8x16.shuffle 0, 1, 2, 3, 4, 5, 6, 7, 24, 25, 26, 27, 28, 29, 30, 312144; CHECK: v128.store2145; CHECK: i8x16.shuffle 0, 1, 2, 3, 16, 17, 18, 19, 0, 1, 2, 3, 0, 1, 2, 32146; CHECK: i8x16.shuffle 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 16, 17, 18, 192147; CHECK: i8x16.shuffle 0, 1, 2, 3, 4, 5, 6, 7, 24, 25, 26, 27, 28, 29, 30, 312148; CHECK: v128.store2149define hidden void @four_bytes_four_floats_same_op(ptr noundef readonly captures(none) %a, ptr noundef readonly captures(none) %b, ptr noundef writeonly captures(none) %res, i32 noundef %N) {2150entry:2151 %cmp52.not = icmp eq i32 %N, 02152 br i1 %cmp52.not, label %for.cond.cleanup, label %for.body2153 2154for.cond.cleanup: ; preds = %for.body, %entry2155 ret void2156 2157for.body: ; preds = %entry, %for.body2158 %i.053 = phi i32 [ %inc, %for.body ], [ 0, %entry ]2159 %arrayidx = getelementptr inbounds nuw %struct.FourBytes, ptr %a, i32 %i.0532160 %0 = load i8, ptr %arrayidx, align 12161 %conv = sitofp i8 %0 to float2162 %arrayidx1 = getelementptr inbounds nuw %struct.FourBytes, ptr %b, i32 %i.0532163 %1 = load i8, ptr %arrayidx1, align 12164 %conv3 = sitofp i8 %1 to float2165 %mul = fmul float %conv, %conv32166 %arrayidx4 = getelementptr inbounds nuw %struct.FourFloats, ptr %res, i32 %i.0532167 store float %mul, ptr %arrayidx4, align 42168 %y = getelementptr inbounds nuw i8, ptr %arrayidx, i32 12169 %2 = load i8, ptr %y, align 12170 %conv7 = sitofp i8 %2 to float2171 %y9 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 12172 %3 = load i8, ptr %y9, align 12173 %conv10 = sitofp i8 %3 to float2174 %mul11 = fmul float %conv7, %conv102175 %y13 = getelementptr inbounds nuw i8, ptr %arrayidx4, i32 42176 store float %mul11, ptr %y13, align 42177 %z = getelementptr inbounds nuw i8, ptr %arrayidx, i32 22178 %4 = load i8, ptr %z, align 12179 %conv15 = sitofp i8 %4 to float2180 %z17 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 22181 %5 = load i8, ptr %z17, align 12182 %conv18 = sitofp i8 %5 to float2183 %mul19 = fmul float %conv15, %conv182184 %z21 = getelementptr inbounds nuw i8, ptr %arrayidx4, i32 82185 store float %mul19, ptr %z21, align 42186 %w = getelementptr inbounds nuw i8, ptr %arrayidx, i32 32187 %6 = load i8, ptr %w, align 12188 %conv23 = sitofp i8 %6 to float2189 %w25 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 32190 %7 = load i8, ptr %w25, align 12191 %conv26 = sitofp i8 %7 to float2192 %mul27 = fmul float %conv23, %conv262193 %w29 = getelementptr inbounds nuw i8, ptr %arrayidx4, i32 122194 store float %mul27, ptr %w29, align 42195 %inc = add nuw i32 %i.053, 12196 %exitcond.not = icmp eq i32 %inc, %N2197 br i1 %exitcond.not, label %for.cond.cleanup, label %for.body2198}2199 2200; CHECK-LABEL: four_bytes_four_floats_vary_op:2201; CHECK: loop2202; CHECK: v128.load2203; CHECK: i8x16.shuffle 0, 4, 8, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02204; CHECK: i16x8.extend_low_i8x16_s2205; CHECK: i32x4.extend_low_i16x8_s2206; CHECK: f32x4.convert_i32x4_s2207; CHECK: v128.load2208; CHECK: i8x16.shuffle 0, 4, 8, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02209; CHECK: i16x8.extend_low_i8x16_s2210; CHECK: i32x4.extend_low_i16x8_s2211; CHECK: f32x4.convert_i32x4_s2212; CHECK: f32x4.mul2213; CHECK: i8x16.shuffle 1, 5, 9, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02214; CHECK: i16x8.extend_low_i8x16_s2215; CHECK: i32x4.extend_low_i16x8_s2216; CHECK: f32x4.convert_i32x4_s2217; CHECK: i8x16.shuffle 1, 5, 9, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02218; CHECK: i16x8.extend_low_i8x16_s2219; CHECK: i32x4.extend_low_i16x8_s2220; CHECK: f32x4.convert_i32x4_s2221; CHECK: f32x4.add2222; CHECK: i8x16.shuffle 12, 13, 14, 15, 28, 29, 30, 31, 0, 1, 2, 3, 0, 1, 2, 32223; CHECK: i8x16.shuffle 2, 6, 10, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02224; CHECK: i16x8.extend_low_i8x16_s2225; CHECK: i32x4.extend_low_i16x8_s2226; CHECK: f32x4.convert_i32x4_s2227; CHECK: i8x16.shuffle 2, 6, 10, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02228; CHECK: i16x8.extend_low_i8x16_s2229; CHECK: i32x4.extend_low_i16x8_s2230; CHECK: f32x4.convert_i32x4_s2231; CHECK: f32x4.div2232; CHECK: i8x16.shuffle 3, 7, 11, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02233; CHECK: i16x8.extend_low_i8x16_s2234; CHECK: i32x4.extend_low_i16x8_s2235; CHECK: f32x4.convert_i32x4_s2236; CHECK: i8x16.shuffle 3, 7, 11, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02237; CHECK: i16x8.extend_low_i8x16_s2238; CHECK: i32x4.extend_low_i16x8_s2239; CHECK: f32x4.convert_i32x4_s2240; CHECK: f32x4.sub2241; CHECK: i8x16.shuffle 0, 1, 2, 3, 0, 1, 2, 3, 12, 13, 14, 15, 28, 29, 30, 312242; CHECK: i8x16.shuffle 0, 1, 2, 3, 4, 5, 6, 7, 24, 25, 26, 27, 28, 29, 30, 312243; CHECK: v128.store2244; CHECK: i8x16.shuffle 8, 9, 10, 11, 24, 25, 26, 27, 0, 1, 2, 3, 0, 1, 2, 32245; CHECK: i8x16.shuffle 0, 1, 2, 3, 0, 1, 2, 3, 8, 9, 10, 11, 24, 25, 26, 272246; CHECK: i8x16.shuffle 0, 1, 2, 3, 4, 5, 6, 7, 24, 25, 26, 27, 28, 29, 30, 312247; CHECK: v128.store2248; CHECK: i8x16.shuffle 4, 5, 6, 7, 20, 21, 22, 23, 0, 1, 2, 3, 0, 1, 2, 32249; CHECK: i8x16.shuffle 0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 6, 7, 20, 21, 22, 232250; CHECK: i8x16.shuffle 0, 1, 2, 3, 4, 5, 6, 7, 24, 25, 26, 27, 28, 29, 30, 312251; CHECK: v128.store2252; CHECK: i8x16.shuffle 0, 1, 2, 3, 16, 17, 18, 19, 0, 1, 2, 3, 0, 1, 2, 32253; CHECK: i8x16.shuffle 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 16, 17, 18, 192254; CHECK: i8x16.shuffle 0, 1, 2, 3, 4, 5, 6, 7, 24, 25, 26, 27, 28, 29, 30, 312255; CHECK: v128.store2256define hidden void @four_bytes_four_floats_vary_op(ptr noundef readonly captures(none) %a, ptr noundef readonly captures(none) %b, ptr noundef writeonly captures(none) %res, i32 noundef %N) {2257entry:2258 %cmp49.not = icmp eq i32 %N, 02259 br i1 %cmp49.not, label %for.cond.cleanup, label %for.body2260 2261for.cond.cleanup: ; preds = %for.body, %entry2262 ret void2263 2264for.body: ; preds = %entry, %for.body2265 %i.050 = phi i32 [ %inc, %for.body ], [ 0, %entry ]2266 %arrayidx = getelementptr inbounds nuw %struct.FourBytes, ptr %a, i32 %i.0502267 %0 = load i8, ptr %arrayidx, align 12268 %conv = sitofp i8 %0 to float2269 %arrayidx1 = getelementptr inbounds nuw %struct.FourBytes, ptr %b, i32 %i.0502270 %1 = load i8, ptr %arrayidx1, align 12271 %conv3 = sitofp i8 %1 to float2272 %mul = fmul float %conv, %conv32273 %arrayidx4 = getelementptr inbounds nuw %struct.FourFloats, ptr %res, i32 %i.0502274 store float %mul, ptr %arrayidx4, align 42275 %y = getelementptr inbounds nuw i8, ptr %arrayidx, i32 12276 %2 = load i8, ptr %y, align 12277 %conv7 = sitofp i8 %2 to float2278 %y9 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 12279 %3 = load i8, ptr %y9, align 12280 %conv10 = sitofp i8 %3 to float2281 %add = fadd float %conv7, %conv102282 %y12 = getelementptr inbounds nuw i8, ptr %arrayidx4, i32 42283 store float %add, ptr %y12, align 42284 %z = getelementptr inbounds nuw i8, ptr %arrayidx, i32 22285 %4 = load i8, ptr %z, align 12286 %conv14 = sitofp i8 %4 to float2287 %z16 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 22288 %5 = load i8, ptr %z16, align 12289 %conv17 = sitofp i8 %5 to float2290 %div = fdiv float %conv14, %conv172291 %z19 = getelementptr inbounds nuw i8, ptr %arrayidx4, i32 82292 store float %div, ptr %z19, align 42293 %w = getelementptr inbounds nuw i8, ptr %arrayidx, i32 32294 %6 = load i8, ptr %w, align 12295 %conv21 = sitofp i8 %6 to float2296 %w23 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 32297 %7 = load i8, ptr %w23, align 12298 %conv24 = sitofp i8 %7 to float2299 %sub = fsub float %conv21, %conv242300 %w26 = getelementptr inbounds nuw i8, ptr %arrayidx4, i32 122301 store float %sub, ptr %w26, align 42302 %inc = add nuw i32 %i.050, 12303 %exitcond.not = icmp eq i32 %inc, %N2304 br i1 %exitcond.not, label %for.cond.cleanup, label %for.body2305}2306 2307; CHECK-LABEL: four_floats_four_bytes_same_op:2308; CHECK-NOT: v128.load2309define hidden void @four_floats_four_bytes_same_op(ptr noundef readonly captures(none) %a, ptr noundef readonly captures(none) %b, ptr noundef writeonly captures(none) %res, i32 noundef %N) {2310entry:2311 %cmp48.not = icmp eq i32 %N, 02312 br i1 %cmp48.not, label %for.cond.cleanup, label %for.body2313 2314for.cond.cleanup: ; preds = %for.body, %entry2315 ret void2316 2317for.body: ; preds = %entry, %for.body2318 %i.049 = phi i32 [ %inc, %for.body ], [ 0, %entry ]2319 %arrayidx = getelementptr inbounds nuw %struct.FourFloats, ptr %a, i32 %i.0492320 %0 = load float, ptr %arrayidx, align 42321 %arrayidx1 = getelementptr inbounds nuw %struct.FourFloats, ptr %b, i32 %i.0492322 %1 = load float, ptr %arrayidx1, align 42323 %mul = fmul float %0, %12324 %conv = fptosi float %mul to i82325 %arrayidx3 = getelementptr inbounds nuw %struct.FourBytes, ptr %res, i32 %i.0492326 store i8 %conv, ptr %arrayidx3, align 12327 %y = getelementptr inbounds nuw i8, ptr %arrayidx, i32 42328 %2 = load float, ptr %y, align 42329 %y7 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 42330 %3 = load float, ptr %y7, align 42331 %mul8 = fmul float %2, %32332 %conv9 = fptosi float %mul8 to i82333 %y11 = getelementptr inbounds nuw i8, ptr %arrayidx3, i32 12334 store i8 %conv9, ptr %y11, align 12335 %z = getelementptr inbounds nuw i8, ptr %arrayidx, i32 82336 %4 = load float, ptr %z, align 42337 %z14 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 82338 %5 = load float, ptr %z14, align 42339 %mul15 = fmul float %4, %52340 %conv16 = fptosi float %mul15 to i82341 %z18 = getelementptr inbounds nuw i8, ptr %arrayidx3, i32 22342 store i8 %conv16, ptr %z18, align 12343 %w = getelementptr inbounds nuw i8, ptr %arrayidx, i32 122344 %6 = load float, ptr %w, align 42345 %w21 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 122346 %7 = load float, ptr %w21, align 42347 %mul22 = fmul float %6, %72348 %conv23 = fptosi float %mul22 to i82349 %w25 = getelementptr inbounds nuw i8, ptr %arrayidx3, i32 32350 store i8 %conv23, ptr %w25, align 12351 %inc = add nuw i32 %i.049, 12352 %exitcond.not = icmp eq i32 %inc, %N2353 br i1 %exitcond.not, label %for.cond.cleanup, label %for.body2354}2355 2356; CHECK-LABEL: four_floats_four_bytes_vary_op:2357; CHECK-NOT: v128.load2358define hidden void @four_floats_four_bytes_vary_op(ptr noundef readonly captures(none) %a, ptr noundef readonly captures(none) %b, ptr noundef writeonly captures(none) %res, i32 noundef %N) {2359entry:2360 %cmp45.not = icmp eq i32 %N, 02361 br i1 %cmp45.not, label %for.cond.cleanup, label %for.body2362 2363for.cond.cleanup: ; preds = %for.body, %entry2364 ret void2365 2366for.body: ; preds = %entry, %for.body2367 %i.046 = phi i32 [ %inc, %for.body ], [ 0, %entry ]2368 %arrayidx = getelementptr inbounds nuw %struct.FourFloats, ptr %a, i32 %i.0462369 %0 = load float, ptr %arrayidx, align 42370 %arrayidx1 = getelementptr inbounds nuw %struct.FourFloats, ptr %b, i32 %i.0462371 %1 = load float, ptr %arrayidx1, align 42372 %mul = fmul float %0, %12373 %conv = fptosi float %mul to i82374 %arrayidx3 = getelementptr inbounds nuw %struct.FourBytes, ptr %res, i32 %i.0462375 store i8 %conv, ptr %arrayidx3, align 12376 %y = getelementptr inbounds nuw i8, ptr %arrayidx, i32 42377 %2 = load float, ptr %y, align 42378 %y7 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 42379 %3 = load float, ptr %y7, align 42380 %add = fadd float %2, %32381 %conv8 = fptosi float %add to i82382 %y10 = getelementptr inbounds nuw i8, ptr %arrayidx3, i32 12383 store i8 %conv8, ptr %y10, align 12384 %z = getelementptr inbounds nuw i8, ptr %arrayidx, i32 82385 %4 = load float, ptr %z, align 42386 %z13 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 82387 %5 = load float, ptr %z13, align 42388 %div = fdiv float %4, %52389 %conv14 = fptosi float %div to i82390 %z16 = getelementptr inbounds nuw i8, ptr %arrayidx3, i32 22391 store i8 %conv14, ptr %z16, align 12392 %w = getelementptr inbounds nuw i8, ptr %arrayidx, i32 122393 %6 = load float, ptr %w, align 42394 %w19 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 122395 %7 = load float, ptr %w19, align 42396 %sub = fsub float %6, %72397 %conv20 = fptosi float %sub to i82398 %w22 = getelementptr inbounds nuw i8, ptr %arrayidx3, i32 32399 store i8 %conv20, ptr %w22, align 12400 %inc = add nuw i32 %i.046, 12401 %exitcond.not = icmp eq i32 %inc, %N2402 br i1 %exitcond.not, label %for.cond.cleanup, label %for.body2403}2404 2405; CHECK-LABEL: four_shorts_four_floats_same_op:2406; CHECK: loop2407; CHECK: v128.load2408; CHECK: v128.load2409; CHECK: i8x16.shuffle 0, 1, 8, 9, 16, 17, 24, 25, 0, 1, 0, 1, 0, 1, 0, 12410; CHECK: i32x4.extend_low_i16x8_s2411; CHECK: f32x4.convert_i32x4_s2412; CHECK: v128.load2413; CHECK: v128.load2414; CHECK: i8x16.shuffle 0, 1, 8, 9, 16, 17, 24, 25, 0, 1, 0, 1, 0, 1, 0, 12415; CHECK: i32x4.extend_low_i16x8_s2416; CHECK: f32x4.convert_i32x4_s2417; CHECK: f32x4.mul2418; CHECK: i8x16.shuffle 2, 3, 10, 11, 18, 19, 26, 27, 0, 1, 0, 1, 0, 1, 0, 12419; CHECK: i32x4.extend_low_i16x8_s2420; CHECK: f32x4.convert_i32x4_s2421; CHECK: i8x16.shuffle 2, 3, 10, 11, 18, 19, 26, 27, 0, 1, 0, 1, 0, 1, 0, 12422; CHECK: i32x4.extend_low_i16x8_s2423; CHECK: f32x4.convert_i32x4_s2424; CHECK: f32x4.mul2425; CHECK: i8x16.shuffle 12, 13, 14, 15, 28, 29, 30, 31, 0, 1, 2, 3, 0, 1, 2, 32426; CHECK: i8x16.shuffle 4, 5, 12, 13, 20, 21, 28, 29, 0, 1, 0, 1, 0, 1, 0, 12427; CHECK: i32x4.extend_low_i16x8_s2428; CHECK: f32x4.convert_i32x4_s2429; CHECK: i8x16.shuffle 4, 5, 12, 13, 20, 21, 28, 29, 0, 1, 0, 1, 0, 1, 0, 12430; CHECK: i32x4.extend_low_i16x8_s2431; CHECK: f32x4.convert_i32x4_s2432; CHECK: f32x4.mul2433; CHECK: i8x16.shuffle 6, 7, 14, 15, 22, 23, 30, 31, 0, 1, 0, 1, 0, 1, 0, 12434; CHECK: i32x4.extend_low_i16x8_s2435; CHECK: f32x4.convert_i32x4_s2436; CHECK: i8x16.shuffle 6, 7, 14, 15, 22, 23, 30, 31, 0, 1, 0, 1, 0, 1, 0, 12437; CHECK: i32x4.extend_low_i16x8_s2438; CHECK: f32x4.convert_i32x4_s2439; CHECK: f32x4.mul2440; CHECK: i8x16.shuffle 0, 1, 2, 3, 0, 1, 2, 3, 12, 13, 14, 15, 28, 29, 30, 312441; CHECK: i8x16.shuffle 0, 1, 2, 3, 4, 5, 6, 7, 24, 25, 26, 27, 28, 29, 30, 312442; CHECK: v128.store2443; CHECK: i8x16.shuffle 8, 9, 10, 11, 24, 25, 26, 27, 0, 1, 2, 3, 0, 1, 2, 32444; CHECK: i8x16.shuffle 0, 1, 2, 3, 0, 1, 2, 3, 8, 9, 10, 11, 24, 25, 26, 272445; CHECK: i8x16.shuffle 0, 1, 2, 3, 4, 5, 6, 7, 24, 25, 26, 27, 28, 29, 30, 312446; CHECK: v128.store2447; CHECK: i8x16.shuffle 4, 5, 6, 7, 20, 21, 22, 23, 0, 1, 2, 3, 0, 1, 2, 32448; CHECK: i8x16.shuffle 0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 6, 7, 20, 21, 22, 232449; CHECK: i8x16.shuffle 0, 1, 2, 3, 4, 5, 6, 7, 24, 25, 26, 27, 28, 29, 30, 312450; CHECK: v128.store2451; CHECK: i8x16.shuffle 0, 1, 2, 3, 16, 17, 18, 19, 0, 1, 2, 3, 0, 1, 2, 32452; CHECK: i8x16.shuffle 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 16, 17, 18, 192453; CHECK: i8x16.shuffle 0, 1, 2, 3, 4, 5, 6, 7, 24, 25, 26, 27, 28, 29, 30, 312454; CHECK: v128.store2455define hidden void @four_shorts_four_floats_same_op(ptr noundef readonly captures(none) %a, ptr noundef readonly captures(none) %b, ptr noundef writeonly captures(none) %res, i32 noundef %N) {2456entry:2457 %cmp52.not = icmp eq i32 %N, 02458 br i1 %cmp52.not, label %for.cond.cleanup, label %for.body2459 2460for.cond.cleanup: ; preds = %for.body, %entry2461 ret void2462 2463for.body: ; preds = %entry, %for.body2464 %i.053 = phi i32 [ %inc, %for.body ], [ 0, %entry ]2465 %arrayidx = getelementptr inbounds nuw %struct.FourShorts, ptr %a, i32 %i.0532466 %0 = load i16, ptr %arrayidx, align 22467 %conv = sitofp i16 %0 to float2468 %arrayidx1 = getelementptr inbounds nuw %struct.FourShorts, ptr %b, i32 %i.0532469 %1 = load i16, ptr %arrayidx1, align 22470 %conv3 = sitofp i16 %1 to float2471 %mul = fmul float %conv, %conv32472 %arrayidx4 = getelementptr inbounds nuw %struct.FourFloats, ptr %res, i32 %i.0532473 store float %mul, ptr %arrayidx4, align 42474 %y = getelementptr inbounds nuw i8, ptr %arrayidx, i32 22475 %2 = load i16, ptr %y, align 22476 %conv7 = sitofp i16 %2 to float2477 %y9 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 22478 %3 = load i16, ptr %y9, align 22479 %conv10 = sitofp i16 %3 to float2480 %mul11 = fmul float %conv7, %conv102481 %y13 = getelementptr inbounds nuw i8, ptr %arrayidx4, i32 42482 store float %mul11, ptr %y13, align 42483 %z = getelementptr inbounds nuw i8, ptr %arrayidx, i32 42484 %4 = load i16, ptr %z, align 22485 %conv15 = sitofp i16 %4 to float2486 %z17 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 42487 %5 = load i16, ptr %z17, align 22488 %conv18 = sitofp i16 %5 to float2489 %mul19 = fmul float %conv15, %conv182490 %z21 = getelementptr inbounds nuw i8, ptr %arrayidx4, i32 82491 store float %mul19, ptr %z21, align 42492 %w = getelementptr inbounds nuw i8, ptr %arrayidx, i32 62493 %6 = load i16, ptr %w, align 22494 %conv23 = sitofp i16 %6 to float2495 %w25 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 62496 %7 = load i16, ptr %w25, align 22497 %conv26 = sitofp i16 %7 to float2498 %mul27 = fmul float %conv23, %conv262499 %w29 = getelementptr inbounds nuw i8, ptr %arrayidx4, i32 122500 store float %mul27, ptr %w29, align 42501 %inc = add nuw i32 %i.053, 12502 %exitcond.not = icmp eq i32 %inc, %N2503 br i1 %exitcond.not, label %for.cond.cleanup, label %for.body2504}2505 2506; CHECK-LABEL: four_shorts_four_floats_vary_op:2507; CHECK: loop2508; CHECK: v128.load2509; CHECK: v128.load2510; CHECK: i8x16.shuffle 0, 1, 8, 9, 16, 17, 24, 25, 0, 1, 0, 1, 0, 1, 0, 12511; CHECK: i32x4.extend_low_i16x8_s2512; CHECK: f32x4.convert_i32x4_s2513; CHECK: v128.load2514; CHECK: v128.load2515; CHECK: i8x16.shuffle 0, 1, 8, 9, 16, 17, 24, 25, 0, 1, 0, 1, 0, 1, 0, 12516; CHECK: i32x4.extend_low_i16x8_s2517; CHECK: f32x4.convert_i32x4_s2518; CHECK: f32x4.mul2519; CHECK: i8x16.shuffle 2, 3, 10, 11, 18, 19, 26, 27, 0, 1, 0, 1, 0, 1, 0, 12520; CHECK: i32x4.extend_low_i16x8_s2521; CHECK: f32x4.convert_i32x4_s2522; CHECK: i8x16.shuffle 2, 3, 10, 11, 18, 19, 26, 27, 0, 1, 0, 1, 0, 1, 0, 12523; CHECK: i32x4.extend_low_i16x8_s2524; CHECK: f32x4.convert_i32x4_s2525; CHECK: f32x4.add2526; CHECK: i8x16.shuffle 12, 13, 14, 15, 28, 29, 30, 31, 0, 1, 2, 3, 0, 1, 2, 32527; CHECK: i8x16.shuffle 4, 5, 12, 13, 20, 21, 28, 29, 0, 1, 0, 1, 0, 1, 0, 12528; CHECK: i32x4.extend_low_i16x8_s2529; CHECK: f32x4.convert_i32x4_s2530; CHECK: i8x16.shuffle 4, 5, 12, 13, 20, 21, 28, 29, 0, 1, 0, 1, 0, 1, 0, 12531; CHECK: i32x4.extend_low_i16x8_s2532; CHECK: f32x4.convert_i32x4_s2533; CHECK: f32x4.div2534; CHECK: i8x16.shuffle 6, 7, 14, 15, 22, 23, 30, 31, 0, 1, 0, 1, 0, 1, 0, 12535; CHECK: i32x4.extend_low_i16x8_s2536; CHECK: f32x4.convert_i32x4_s2537; CHECK: i8x16.shuffle 6, 7, 14, 15, 22, 23, 30, 31, 0, 1, 0, 1, 0, 1, 0, 12538; CHECK: i32x4.extend_low_i16x8_s2539; CHECK: f32x4.convert_i32x4_s2540; CHECK: f32x4.sub2541; CHECK: i8x16.shuffle 0, 1, 2, 3, 0, 1, 2, 3, 12, 13, 14, 15, 28, 29, 30, 312542; CHECK: i8x16.shuffle 0, 1, 2, 3, 4, 5, 6, 7, 24, 25, 26, 27, 28, 29, 30, 312543; CHECK: v128.store2544; CHECK: i8x16.shuffle 8, 9, 10, 11, 24, 25, 26, 27, 0, 1, 2, 3, 0, 1, 2, 32545; CHECK: i8x16.shuffle 0, 1, 2, 3, 0, 1, 2, 3, 8, 9, 10, 11, 24, 25, 26, 272546; CHECK: i8x16.shuffle 0, 1, 2, 3, 4, 5, 6, 7, 24, 25, 26, 27, 28, 29, 30, 312547; CHECK: v128.store2548; CHECK: i8x16.shuffle 4, 5, 6, 7, 20, 21, 22, 23, 0, 1, 2, 3, 0, 1, 2, 32549; CHECK: i8x16.shuffle 0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 6, 7, 20, 21, 22, 232550; CHECK: i8x16.shuffle 0, 1, 2, 3, 4, 5, 6, 7, 24, 25, 26, 27, 28, 29, 30, 312551; CHECK: v128.store2552define hidden void @four_shorts_four_floats_vary_op(ptr noundef readonly captures(none) %a, ptr noundef readonly captures(none) %b, ptr noundef writeonly captures(none) %res, i32 noundef %N) {2553entry:2554 %cmp49.not = icmp eq i32 %N, 02555 br i1 %cmp49.not, label %for.cond.cleanup, label %for.body2556 2557for.cond.cleanup: ; preds = %for.body, %entry2558 ret void2559 2560for.body: ; preds = %entry, %for.body2561 %i.050 = phi i32 [ %inc, %for.body ], [ 0, %entry ]2562 %arrayidx = getelementptr inbounds nuw %struct.FourShorts, ptr %a, i32 %i.0502563 %0 = load i16, ptr %arrayidx, align 22564 %conv = sitofp i16 %0 to float2565 %arrayidx1 = getelementptr inbounds nuw %struct.FourShorts, ptr %b, i32 %i.0502566 %1 = load i16, ptr %arrayidx1, align 22567 %conv3 = sitofp i16 %1 to float2568 %mul = fmul float %conv, %conv32569 %arrayidx4 = getelementptr inbounds nuw %struct.FourFloats, ptr %res, i32 %i.0502570 store float %mul, ptr %arrayidx4, align 42571 %y = getelementptr inbounds nuw i8, ptr %arrayidx, i32 22572 %2 = load i16, ptr %y, align 22573 %conv7 = sitofp i16 %2 to float2574 %y9 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 22575 %3 = load i16, ptr %y9, align 22576 %conv10 = sitofp i16 %3 to float2577 %add = fadd float %conv7, %conv102578 %y12 = getelementptr inbounds nuw i8, ptr %arrayidx4, i32 42579 store float %add, ptr %y12, align 42580 %z = getelementptr inbounds nuw i8, ptr %arrayidx, i32 42581 %4 = load i16, ptr %z, align 22582 %conv14 = sitofp i16 %4 to float2583 %z16 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 42584 %5 = load i16, ptr %z16, align 22585 %conv17 = sitofp i16 %5 to float2586 %div = fdiv float %conv14, %conv172587 %z19 = getelementptr inbounds nuw i8, ptr %arrayidx4, i32 82588 store float %div, ptr %z19, align 42589 %w = getelementptr inbounds nuw i8, ptr %arrayidx, i32 62590 %6 = load i16, ptr %w, align 22591 %conv21 = sitofp i16 %6 to float2592 %w23 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 62593 %7 = load i16, ptr %w23, align 22594 %conv24 = sitofp i16 %7 to float2595 %sub = fsub float %conv21, %conv242596 %w26 = getelementptr inbounds nuw i8, ptr %arrayidx4, i32 122597 store float %sub, ptr %w26, align 42598 %inc = add nuw i32 %i.050, 12599 %exitcond.not = icmp eq i32 %inc, %N2600 br i1 %exitcond.not, label %for.cond.cleanup, label %for.body2601}2602 2603; CHECK-LABEL: four_floats_four_shorts_same_op:2604; CHECK-NOT: v128.load2605define hidden void @four_floats_four_shorts_same_op(ptr noundef readonly captures(none) %a, ptr noundef readonly captures(none) %b, ptr noundef writeonly captures(none) %res, i32 noundef %N) {2606entry:2607 %cmp48.not = icmp eq i32 %N, 02608 br i1 %cmp48.not, label %for.cond.cleanup, label %for.body2609 2610for.cond.cleanup: ; preds = %for.body, %entry2611 ret void2612 2613for.body: ; preds = %entry, %for.body2614 %i.049 = phi i32 [ %inc, %for.body ], [ 0, %entry ]2615 %arrayidx = getelementptr inbounds nuw %struct.FourFloats, ptr %a, i32 %i.0492616 %0 = load float, ptr %arrayidx, align 42617 %arrayidx1 = getelementptr inbounds nuw %struct.FourFloats, ptr %b, i32 %i.0492618 %1 = load float, ptr %arrayidx1, align 42619 %mul = fmul float %0, %12620 %conv = fptosi float %mul to i162621 %arrayidx3 = getelementptr inbounds nuw %struct.FourShorts, ptr %res, i32 %i.0492622 store i16 %conv, ptr %arrayidx3, align 22623 %y = getelementptr inbounds nuw i8, ptr %arrayidx, i32 42624 %2 = load float, ptr %y, align 42625 %y7 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 42626 %3 = load float, ptr %y7, align 42627 %mul8 = fmul float %2, %32628 %conv9 = fptosi float %mul8 to i162629 %y11 = getelementptr inbounds nuw i8, ptr %arrayidx3, i32 22630 store i16 %conv9, ptr %y11, align 22631 %z = getelementptr inbounds nuw i8, ptr %arrayidx, i32 82632 %4 = load float, ptr %z, align 42633 %z14 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 82634 %5 = load float, ptr %z14, align 42635 %mul15 = fmul float %4, %52636 %conv16 = fptosi float %mul15 to i162637 %z18 = getelementptr inbounds nuw i8, ptr %arrayidx3, i32 42638 store i16 %conv16, ptr %z18, align 22639 %w = getelementptr inbounds nuw i8, ptr %arrayidx, i32 122640 %6 = load float, ptr %w, align 42641 %w21 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 122642 %7 = load float, ptr %w21, align 42643 %mul22 = fmul float %6, %72644 %conv23 = fptosi float %mul22 to i162645 %w25 = getelementptr inbounds nuw i8, ptr %arrayidx3, i32 62646 store i16 %conv23, ptr %w25, align 22647 %inc = add nuw i32 %i.049, 12648 %exitcond.not = icmp eq i32 %inc, %N2649 br i1 %exitcond.not, label %for.cond.cleanup, label %for.body2650}2651 2652; CHECK-LABEL: four_floats_four_shorts_vary_op:2653; CHECK-NOT: v128.load2654define hidden void @four_floats_four_shorts_vary_op(ptr noundef readonly captures(none) %a, ptr noundef readonly captures(none) %b, ptr noundef writeonly captures(none) %res, i32 noundef %N) {2655entry:2656 %cmp45.not = icmp eq i32 %N, 02657 br i1 %cmp45.not, label %for.cond.cleanup, label %for.body2658 2659for.cond.cleanup: ; preds = %for.body, %entry2660 ret void2661 2662for.body: ; preds = %entry, %for.body2663 %i.046 = phi i32 [ %inc, %for.body ], [ 0, %entry ]2664 %arrayidx = getelementptr inbounds nuw %struct.FourFloats, ptr %a, i32 %i.0462665 %0 = load float, ptr %arrayidx, align 42666 %arrayidx1 = getelementptr inbounds nuw %struct.FourFloats, ptr %b, i32 %i.0462667 %1 = load float, ptr %arrayidx1, align 42668 %mul = fmul float %0, %12669 %conv = fptosi float %mul to i162670 %arrayidx3 = getelementptr inbounds nuw %struct.FourShorts, ptr %res, i32 %i.0462671 store i16 %conv, ptr %arrayidx3, align 22672 %y = getelementptr inbounds nuw i8, ptr %arrayidx, i32 42673 %2 = load float, ptr %y, align 42674 %y7 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 42675 %3 = load float, ptr %y7, align 42676 %add = fadd float %2, %32677 %conv8 = fptosi float %add to i162678 %y10 = getelementptr inbounds nuw i8, ptr %arrayidx3, i32 22679 store i16 %conv8, ptr %y10, align 22680 %z = getelementptr inbounds nuw i8, ptr %arrayidx, i32 82681 %4 = load float, ptr %z, align 42682 %z13 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 82683 %5 = load float, ptr %z13, align 42684 %div = fdiv float %4, %52685 %conv14 = fptosi float %div to i162686 %z16 = getelementptr inbounds nuw i8, ptr %arrayidx3, i32 42687 store i16 %conv14, ptr %z16, align 22688 %w = getelementptr inbounds nuw i8, ptr %arrayidx, i32 122689 %6 = load float, ptr %w, align 42690 %w19 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 122691 %7 = load float, ptr %w19, align 42692 %sub = fsub float %6, %72693 %conv20 = fptosi float %sub to i162694 %w22 = getelementptr inbounds nuw i8, ptr %arrayidx3, i32 62695 store i16 %conv20, ptr %w22, align 22696 %inc = add nuw i32 %i.046, 12697 %exitcond.not = icmp eq i32 %inc, %N2698 br i1 %exitcond.not, label %for.cond.cleanup, label %for.body2699}2700