brintos

brintos / llvm-project-archived public Read only

0
0
Text · 104.9 KiB · 718e03c Raw
2353 lines · plain
1; REQUIRES: asserts2; RUN: opt -mattr=+simd128 -passes=loop-vectorize -debug-only=loop-vectorize,vectorutils -disable-output < %s 2>&1 | FileCheck %s3 4target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-n32:64-S128-ni:1:10:20"5target triple = "wasm32-unknown-wasi"6 7%struct.TwoInts = type { i32, i32 }8%struct.ThreeInts = type { i32, i32, i32 }9%struct.FourInts = type { i32, i32, i32, i32 }10%struct.TwoShorts = type { i16, i16 }11%struct.ThreeShorts = type { i16, i16, i16 }12%struct.FourShorts = type { i16, i16, i16, i16 }13%struct.TwoBytes = type { i8, i8 }14%struct.ThreeBytes = type { i8, i8, i8 }15%struct.FourBytes = type { i8, i8, i8, i8 }16%struct.FiveBytes = type { i8, i8, i8, i8, i8 }17%struct.EightBytes = type { i8, i8, i8, i8, i8, i8, i8, i8 }18%struct.TwoFloats = type { float, float }19%struct.FourFloats = type { float, float, float, float }20 21; CHECK-LABEL: two_ints_same_op22; CHECK: Cost of 7 for VF 2: INTERLEAVE-GROUP with factor 2 at %1023; CHECK: Cost of 6 for VF 4: INTERLEAVE-GROUP with factor 2 at %1024; CHECK: LV: Scalar loop costs: 12.25; CHECK: LV: Vector loop of width 2 costs: 13.26; CHECK: LV: Vector loop of width 4 costs: 6.27; CHECK: LV: Selecting VF: 428define 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) {29  %5 = icmp eq i32 %3, 030  br i1 %5, label %6, label %731 326:                                                ; preds = %7, %433  ret void34 357:                                                ; preds = %4, %736  %8 = phi i32 [ %21, %7 ], [ 0, %4 ]37  %9 = getelementptr inbounds %struct.TwoInts, ptr %1, i32 %838  %10 = load i32, ptr %9, align 439  %11 = getelementptr inbounds %struct.TwoInts, ptr %2, i32 %840  %12 = load i32, ptr %11, align 441  %13 = add i32 %12, %1042  %14 = getelementptr inbounds %struct.TwoInts, ptr %0, i32 %843  store i32 %13, ptr %14, align 444  %15 = getelementptr inbounds i8, ptr %9, i32 445  %16 = load i32, ptr %15, align 446  %17 = getelementptr inbounds i8, ptr %11, i32 447  %18 = load i32, ptr %17, align 448  %19 = add i32 %18, %1649  %20 = getelementptr inbounds i8, ptr %14, i32 450  store i32 %19, ptr %20, align 451  %21 = add nuw i32 %8, 152  %22 = icmp eq i32 %21, %353  br i1 %22, label %6, label %754}55 56; CHECK-LABEL: two_ints_vary_op57; CHECK: Cost of 7 for VF 2: INTERLEAVE-GROUP with factor 2 at %1058; CHECK: Cost of 6 for VF 4: INTERLEAVE-GROUP with factor 2 at %1059; CHECK: LV: Scalar loop costs: 12.60; CHECK: LV: Vector loop of width 2 costs: 13.61; CHECK: LV: Vector loop of width 4 costs: 6.62; CHECK: LV: Selecting VF: 463define 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) {64  %5 = icmp eq i32 %3, 065  br i1 %5, label %6, label %766 676:                                                ; preds = %7, %468  ret void69 707:                                                ; preds = %4, %771  %8 = phi i32 [ %21, %7 ], [ 0, %4 ]72  %9 = getelementptr inbounds %struct.TwoInts, ptr %1, i32 %873  %10 = load i32, ptr %9, align 474  %11 = getelementptr inbounds %struct.TwoInts, ptr %2, i32 %875  %12 = load i32, ptr %11, align 476  %13 = add i32 %12, %1077  %14 = getelementptr inbounds %struct.TwoInts, ptr %0, i32 %878  store i32 %13, ptr %14, align 479  %15 = getelementptr inbounds i8, ptr %9, i32 480  %16 = load i32, ptr %15, align 481  %17 = getelementptr inbounds i8, ptr %11, i32 482  %18 = load i32, ptr %17, align 483  %19 = sub i32 %16, %1884  %20 = getelementptr inbounds i8, ptr %14, i32 485  store i32 %19, ptr %20, align 486  %21 = add nuw i32 %8, 187  %22 = icmp eq i32 %21, %388  br i1 %22, label %6, label %789}90 91; CHECK-LABEL: three_ints92; CHECK: Cost of 14 for VF 2: INTERLEAVE-GROUP with factor 3 at93; CHECK: Cost of 28 for VF 4: INTERLEAVE-GROUP with factor 3 at94; CHECK: LV: Scalar loop costs: 16.95; CHECK: LV: Found an estimated cost of 14 for VF 2 For instruction: %10 = load i32, ptr %996; CHECK: LV: Found an estimated cost of 14 for VF 2 For instruction: %12 = load i32, ptr %1197; CHECK: LV: Found an estimated cost of 14 for VF 2 For instruction: store i32 %25, ptr %2698; CHECK: LV: Vector loop of width 2 costs: 24.99; CHECK: LV: Found an estimated cost of 28 for VF 4 For instruction: %10 = load i32, ptr %9100; CHECK: LV: Found an estimated cost of 28 for VF 4 For instruction: %12 = load i32, ptr %11101; CHECK: LV: Found an estimated cost of 28 for VF 4 For instruction: store i32 %25, ptr %26102; CHECK: LV: Vector loop of width 4 costs: 22.103; CHECK: LV: Selecting VF: 1104define hidden void @three_ints(ptr noalias nocapture noundef writeonly %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2, i32 noundef %3) {105  %5 = icmp eq i32 %3, 0106  br i1 %5, label %6, label %7107 1086:                                                ; preds = %7, %4109  ret void110 1117:                                                ; preds = %4, %7112  %8 = phi i32 [ %27, %7 ], [ 0, %4 ]113  %9 = getelementptr inbounds %struct.ThreeInts, ptr %1, i32 %8114  %10 = load i32, ptr %9, align 4115  %11 = getelementptr inbounds %struct.ThreeInts, ptr %2, i32 %8116  %12 = load i32, ptr %11, align 4117  %13 = add nsw i32 %12, %10118  %14 = getelementptr inbounds %struct.ThreeInts, ptr %0, i32 %8119  store i32 %13, ptr %14, align 4120  %15 = getelementptr inbounds i8, ptr %9, i32 4121  %16 = load i32, ptr %15, align 4122  %17 = getelementptr inbounds i8, ptr %11, i32 4123  %18 = load i32, ptr %17, align 4124  %19 = add nsw i32 %18, %16125  %20 = getelementptr inbounds i8, ptr %14, i32 4126  store i32 %19, ptr %20, align 4127  %21 = getelementptr inbounds i8, ptr %9, i32 8128  %22 = load i32, ptr %21, align 4129  %23 = getelementptr inbounds i8, ptr %11, i32 8130  %24 = load i32, ptr %23, align 4131  %25 = add nsw i32 %24, %22132  %26 = getelementptr inbounds i8, ptr %14, i32 8133  store i32 %25, ptr %26, align 4134  %27 = add nuw i32 %8, 1135  %28 = icmp eq i32 %27, %3136  br i1 %28, label %6, label %7137}138 139; CHECK-LABEL: three_shorts140; CHECK: Cost of 26 for VF 4: INTERLEAVE-GROUP with factor 3141; CHECK: Cost of 52 for VF 8: INTERLEAVE-GROUP with factor 3142; CHECK: LV: Scalar loop costs: 16.143; CHECK: LV: Found an estimated cost of 6 for VF 2 For instruction: %10 = load i16144; CHECK: LV: Found an estimated cost of 6 for VF 2 For instruction: %12 = load i16145; CHECK: LV: Found an estimated cost of 6 for VF 2 For instruction: store i16 %25146; CHECK: LV: Vector loop of width 2 costs: 30.147; CHECK: LV: Found an estimated cost of 26 for VF 4 For instruction: %10 = load i16148; CHECK: LV: Found an estimated cost of 26 for VF 4 For instruction: %12 = load i16149; CHECK: LV: Found an estimated cost of 26 for VF 4 For instruction: store i16 %25150; CHECK: LV: Vector loop of width 4 costs: 21.151; CHECK: LV: Found an estimated cost of 52 for VF 8 For instruction: %10 = load i16152; CHECK: LV: Found an estimated cost of 52 for VF 8 For instruction: %12 = load i16153; CHECK: LV: Found an estimated cost of 52 for VF 8 For instruction: store i16 %25154; CHECK: LV: Vector loop of width 8 costs: 20.155; CHECK: LV: Selecting VF: 1156define hidden void @three_shorts(ptr noalias nocapture noundef writeonly %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2, i32 noundef %3) {157  %5 = icmp eq i32 %3, 0158  br i1 %5, label %6, label %7159 1606:                                                ; preds = %7, %4161  ret void162 1637:                                                ; preds = %4, %7164  %8 = phi i32 [ %27, %7 ], [ 0, %4 ]165  %9 = getelementptr inbounds %struct.ThreeShorts, ptr %1, i32 %8166  %10 = load i16, ptr %9, align 2167  %11 = getelementptr inbounds %struct.ThreeShorts, ptr %2, i32 %8168  %12 = load i16, ptr %11, align 2169  %13 = mul i16 %12, %10170  %14 = getelementptr inbounds %struct.ThreeShorts, ptr %0, i32 %8171  store i16 %13, ptr %14, align 2172  %15 = getelementptr inbounds i8, ptr %9, i32 2173  %16 = load i16, ptr %15, align 2174  %17 = getelementptr inbounds i8, ptr %11, i32 2175  %18 = load i16, ptr %17, align 2176  %19 = mul i16 %18, %16177  %20 = getelementptr inbounds i8, ptr %14, i32 2178  store i16 %19, ptr %20, align 2179  %21 = getelementptr inbounds i8, ptr %9, i32 4180  %22 = load i16, ptr %21, align 2181  %23 = getelementptr inbounds i8, ptr %11, i32 4182  %24 = load i16, ptr %23, align 2183  %25 = mul i16 %24, %22184  %26 = getelementptr inbounds i8, ptr %14, i32 4185  store i16 %25, ptr %26, align 2186  %27 = add nuw i32 %8, 1187  %28 = icmp eq i32 %27, %3188  br i1 %28, label %6, label %7189}190 191; CHECK-LABEL: four_shorts_same_op192; CHECK: Cost of 18 for VF 2: INTERLEAVE-GROUP with factor 4193; CHECK: Cost of 18 for VF 4: INTERLEAVE-GROUP with factor 4194; CHECK: Cost of 18 for VF 4: INTERLEAVE-GROUP with factor 4195; CHECK: Cost of 68 for VF 8: INTERLEAVE-GROUP with factor 4196; CHECK: LV: Scalar loop costs: 20.197; CHECK: LV: Found an estimated cost of 18 for VF 2 For instruction: %10 = load i16198; CHECK: LV: Found an estimated cost of 18 for VF 2 For instruction: %12 = load i16199; CHECK: LV: Found an estimated cost of 18 for VF 2 For instruction: store i16200; CHECK: LV: Vector loop of width 2 costs: 31.201; CHECK: LV: Found an estimated cost of 18 for VF 4 For instruction: %10 = load i16202; CHECK: LV: Found an estimated cost of 18 for VF 4 For instruction: %12 = load i16203; CHECK: LV: Found an estimated cost of 18 for VF 4 For instruction: store i16204; CHECK: LV: Vector loop of width 4 costs: 15.205; CHECK: LV: Found an estimated cost of 68 for VF 8 For instruction: %10 = load i16206; CHECK: LV: Found an estimated cost of 68 for VF 8 For instruction: %12 = load i16207; CHECK: LV: Found an estimated cost of 68 for VF 8 For instruction: store i16208; CHECK: LV: Vector loop of width 8 costs: 26209; CHECK: LV: Selecting VF: 4210define 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) {211  %5 = icmp eq i32 %3, 0212  br i1 %5, label %6, label %7213 2146:                                                ; preds = %7, %4215  ret void216 2177:                                                ; preds = %4, %7218  %8 = phi i32 [ %33, %7 ], [ 0, %4 ]219  %9 = getelementptr inbounds %struct.FourShorts, ptr %1, i32 %8220  %10 = load i16, ptr %9, align 2221  %11 = getelementptr inbounds %struct.FourShorts, ptr %2, i32 %8222  %12 = load i16, ptr %11, align 2223  %13 = sub i16 %10, %12224  %14 = getelementptr inbounds %struct.FourShorts, ptr %0, i32 %8225  store i16 %13, ptr %14, align 2226  %15 = getelementptr inbounds i8, ptr %9, i32 2227  %16 = load i16, ptr %15, align 2228  %17 = getelementptr inbounds i8, ptr %11, i32 2229  %18 = load i16, ptr %17, align 2230  %19 = sub i16 %16, %18231  %20 = getelementptr inbounds i8, ptr %14, i32 2232  store i16 %19, ptr %20, align 2233  %21 = getelementptr inbounds i8, ptr %9, i32 4234  %22 = load i16, ptr %21, align 2235  %23 = getelementptr inbounds i8, ptr %11, i32 4236  %24 = load i16, ptr %23, align 2237  %25 = sub i16 %22, %24238  %26 = getelementptr inbounds i8, ptr %14, i32 4239  store i16 %25, ptr %26, align 2240  %27 = getelementptr inbounds i8, ptr %9, i32 6241  %28 = load i16, ptr %27, align 2242  %29 = getelementptr inbounds i8, ptr %11, i32 6243  %30 = load i16, ptr %29, align 2244  %31 = sub i16 %28, %30245  %32 = getelementptr inbounds i8, ptr %14, i32 6246  store i16 %31, ptr %32, align 2247  %33 = add nuw i32 %8, 1248  %34 = icmp eq i32 %33, %3249  br i1 %34, label %6, label %7250}251 252; CHECK-LABEL: four_shorts_split_op253; CHECK: Cost of 18 for VF 2: INTERLEAVE-GROUP with factor 4254; CHECK: Cost of 18 for VF 4: INTERLEAVE-GROUP with factor 4255; CHECK: Cost of 68 for VF 8: INTERLEAVE-GROUP with factor 4256; CHECK: LV: Scalar loop costs: 20.257; CHECK: LV: Found an estimated cost of 18 for VF 2 For instruction: %10 = load i16258; CHECK: LV: Found an estimated cost of 18 for VF 2 For instruction: %12 = load i16259; CHECK: LV: Found an estimated cost of 18 for VF 2 For instruction: store i16260; CHECK: LV: Vector loop of width 2 costs: 31.261; CHECK: LV: Found an estimated cost of 18 for VF 4 For instruction: %10 = load i16262; CHECK: LV: Found an estimated cost of 18 for VF 4 For instruction: %12 = load i16263; CHECK: LV: Found an estimated cost of 18 for VF 4 For instruction: store i16 %31264; CHECK: LV: Vector loop of width 4 costs: 15.265; CHECK: LV: Found an estimated cost of 68 for VF 8 For instruction: %10 = load i16266; CHECK: LV: Found an estimated cost of 68 for VF 8 For instruction: %12 = load i16267; CHECK: LV: Found an estimated cost of 68 for VF 8 For instruction: store i16 %31268; CHECK: LV: Vector loop of width 8 costs: 26.269; CHECK: LV: Selecting VF: 4270define 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) {271  %5 = icmp eq i32 %3, 0272  br i1 %5, label %6, label %7273 2746:                                                ; preds = %7, %4275  ret void276 2777:                                                ; preds = %4, %7278  %8 = phi i32 [ %33, %7 ], [ 0, %4 ]279  %9 = getelementptr inbounds %struct.FourShorts, ptr %1, i32 %8280  %10 = load i16, ptr %9, align 2281  %11 = getelementptr inbounds %struct.FourShorts, ptr %2, i32 %8282  %12 = load i16, ptr %11, align 2283  %13 = or i16 %12, %10284  %14 = getelementptr inbounds %struct.FourShorts, ptr %0, i32 %8285  store i16 %13, ptr %14, align 2286  %15 = getelementptr inbounds i8, ptr %9, i32 2287  %16 = load i16, ptr %15, align 2288  %17 = getelementptr inbounds i8, ptr %11, i32 2289  %18 = load i16, ptr %17, align 2290  %19 = or i16 %18, %16291  %20 = getelementptr inbounds i8, ptr %14, i32 2292  store i16 %19, ptr %20, align 2293  %21 = getelementptr inbounds i8, ptr %9, i32 4294  %22 = load i16, ptr %21, align 2295  %23 = getelementptr inbounds i8, ptr %11, i32 4296  %24 = load i16, ptr %23, align 2297  %25 = xor i16 %24, %22298  %26 = getelementptr inbounds i8, ptr %14, i32 4299  store i16 %25, ptr %26, align 2300  %27 = getelementptr inbounds i8, ptr %9, i32 6301  %28 = load i16, ptr %27, align 2302  %29 = getelementptr inbounds i8, ptr %11, i32 6303  %30 = load i16, ptr %29, align 2304  %31 = xor i16 %30, %28305  %32 = getelementptr inbounds i8, ptr %14, i32 6306  store i16 %31, ptr %32, align 2307  %33 = add nuw i32 %8, 1308  %34 = icmp eq i32 %33, %3309  br i1 %34, label %6, label %7310}311 312; CHECK-LABEL: four_shorts_interleave_op313; CHECK: Cost of 18 for VF 2: INTERLEAVE-GROUP with factor 4314; CHECK: Cost of 18 for VF 4: INTERLEAVE-GROUP with factor 4315; CHECK: Cost of 68 for VF 8: INTERLEAVE-GROUP with factor 4316; CHECK: LV: Scalar loop costs: 20.317; CHECK: LV: Found an estimated cost of 18 for VF 2 For instruction: %10 = load i16318; CHECK: LV: Found an estimated cost of 18 for VF 2 For instruction: %12 = load i16319; CHECK: LV: Found an estimated cost of 18 for VF 2 For instruction: store i16320; CHECK: LV: Vector loop of width 2 costs: 31.321; CHECK: LV: Found an estimated cost of 18 for VF 4 For instruction: %10 = load i16322; CHECK: LV: Found an estimated cost of 18 for VF 4 For instruction: %12 = load i16323; CHECK: LV: Found an estimated cost of 18 for VF 4 For instruction: store i16324; CHECK: LV: Vector loop of width 4 costs: 15.325; CHECK: LV: Found an estimated cost of 68 for VF 8 For instruction: %10 = load i16326; CHECK: LV: Found an estimated cost of 68 for VF 8 For instruction: %12 = load i16327; CHECK: LV: Found an estimated cost of 68 for VF 8 For instruction: store i16328; CHECK: LV: Vector loop of width 8 costs: 26.329; CHECK: LV: Selecting VF: 4330define 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) {331  %5 = icmp eq i32 %3, 0332  br i1 %5, label %6, label %7333 3346:                                                ; preds = %7, %4335  ret void336 3377:                                                ; preds = %4, %7338  %8 = phi i32 [ %33, %7 ], [ 0, %4 ]339  %9 = getelementptr inbounds %struct.FourShorts, ptr %1, i32 %8340  %10 = load i16, ptr %9, align 2341  %11 = getelementptr inbounds %struct.FourShorts, ptr %2, i32 %8342  %12 = load i16, ptr %11, align 2343  %13 = or i16 %12, %10344  %14 = getelementptr inbounds %struct.FourShorts, ptr %0, i32 %8345  store i16 %13, ptr %14, align 2346  %15 = getelementptr inbounds i8, ptr %9, i32 2347  %16 = load i16, ptr %15, align 2348  %17 = getelementptr inbounds i8, ptr %11, i32 2349  %18 = load i16, ptr %17, align 2350  %19 = xor i16 %18, %16351  %20 = getelementptr inbounds i8, ptr %14, i32 2352  store i16 %19, ptr %20, align 2353  %21 = getelementptr inbounds i8, ptr %9, i32 4354  %22 = load i16, ptr %21, align 2355  %23 = getelementptr inbounds i8, ptr %11, i32 4356  %24 = load i16, ptr %23, align 2357  %25 = or i16 %24, %22358  %26 = getelementptr inbounds i8, ptr %14, i32 4359  store i16 %25, ptr %26, align 2360  %27 = getelementptr inbounds i8, ptr %9, i32 6361  %28 = load i16, ptr %27, align 2362  %29 = getelementptr inbounds i8, ptr %11, i32 6363  %30 = load i16, ptr %29, align 2364  %31 = xor i16 %30, %28365  %32 = getelementptr inbounds i8, ptr %14, i32 6366  store i16 %31, ptr %32, align 2367  %33 = add nuw i32 %8, 1368  %34 = icmp eq i32 %33, %3369  br i1 %34, label %6, label %7370}371 372; CHECK-LABEL: five_shorts373; CHECK: Cost of 42 for VF 4: INTERLEAVE-GROUP with factor 5374; CHECK: Cost of 84 for VF 8: INTERLEAVE-GROUP with factor 5375; CHECK: LV: Found an estimated cost of 84 for VF 8 For instruction: %10 = load i8376; CHECK: LV: Found an estimated cost of 84 for VF 8 For instruction: %12 = load i8377; CHECK: LV: Found an estimated cost of 84 for VF 8 For instruction: store i8 %37378; CHECK: LV: Vector loop of width 8 costs: 32379; CHECK: LV: Found an estimated cost of 168 for VF 16 For instruction: %10 = load i8380; CHECK: LV: Found an estimated cost of 168 for VF 16 For instruction: %12 = load i8381; CHECK: LV: Found an estimated cost of 168 for VF 16 For instruction: store i8 %37382; CHECK: LV: Vector loop of width 16 costs: 32383; CHECK: LV: Selecting VF: 1384define hidden void @five_shorts(ptr noalias nocapture noundef writeonly %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2, i32 noundef %3) {385  %5 = icmp eq i32 %3, 0386  br i1 %5, label %6, label %7387 3886:                                                ; preds = %7, %4389  ret void390 3917:                                                ; preds = %4, %7392  %8 = phi i32 [ %39, %7 ], [ 0, %4 ]393  %9 = getelementptr inbounds %struct.FiveBytes, ptr %1, i32 %8394  %10 = load i8, ptr %9, align 1395  %11 = getelementptr inbounds %struct.FiveBytes, ptr %2, i32 %8396  %12 = load i8, ptr %11, align 1397  %13 = sub i8 %10, %12398  %14 = getelementptr inbounds %struct.FiveBytes, ptr %0, i32 %8399  store i8 %13, ptr %14, align 1400  %15 = getelementptr inbounds i8, ptr %9, i32 1401  %16 = load i8, ptr %15, align 1402  %17 = getelementptr inbounds i8, ptr %11, i32 1403  %18 = load i8, ptr %17, align 1404  %19 = sub i8 %16, %18405  %20 = getelementptr inbounds i8, ptr %14, i32 1406  store i8 %19, ptr %20, align 1407  %21 = getelementptr inbounds i8, ptr %9, i32 2408  %22 = load i8, ptr %21, align 1409  %23 = getelementptr inbounds i8, ptr %11, i32 2410  %24 = load i8, ptr %23, align 1411  %25 = sub i8 %22, %24412  %26 = getelementptr inbounds i8, ptr %14, i32 2413  store i8 %25, ptr %26, align 1414  %27 = getelementptr inbounds i8, ptr %9, i32 3415  %28 = load i8, ptr %27, align 1416  %29 = getelementptr inbounds i8, ptr %11, i32 3417  %30 = load i8, ptr %29, align 1418  %31 = sub i8 %28, %30419  %32 = getelementptr inbounds i8, ptr %14, i32 3420  store i8 %31, ptr %32, align 1421  %33 = getelementptr inbounds i8, ptr %9, i32 4422  %34 = load i8, ptr %33, align 1423  %35 = getelementptr inbounds i8, ptr %11, i32 4424  %36 = load i8, ptr %35, align 1425  %37 = sub i8 %34, %36426  %38 = getelementptr inbounds i8, ptr %14, i32 4427  store i8 %37, ptr %38, align 1428  %39 = add nuw i32 %8, 1429  %40 = icmp eq i32 %39, %3430  br i1 %40, label %6, label %7431}432 433; CHECK-LABEL: two_bytes_same_op434; CHECK: Cost of 11 for VF 4: INTERLEAVE-GROUP with factor 2435; CHECK: Cost of 7 for VF 8: INTERLEAVE-GROUP with factor 2436; CHECK: Cost of 6 for VF 16: INTERLEAVE-GROUP with factor 2437; CHECK: LV: Scalar loop costs: 12.438; CHECK: LV: Found an estimated cost of 6 for VF 2 For instruction: %12 = load i8439; CHECK: LV: Found an estimated cost of 6 for VF 2 For instruction: %13 = mul i8440; CHECK: LV: Found an estimated cost of 6 for VF 2 For instruction: store i8 %13441; CHECK: LV: Vector loop of width 2 costs: 26.442; CHECK: LV: Found an estimated cost of 11 for VF 4 For instruction: %10 = load i8443; CHECK: LV: Found an estimated cost of 12 for VF 4 For instruction: %13 = mul i8444; CHECK: LV: Found an estimated cost of 11 for VF 4 For instruction: store i8445; CHECK: LV: Vector loop of width 4 costs: 15.446; CHECK: LV: Found an estimated cost of 7 for VF 8 For instruction: %12 = load i8447; CHECK: LV: Found an estimated cost of 24 for VF 8 For instruction: %13 = mul i8448; CHECK: LV: Found an estimated cost of 7 for VF 8 For instruction: store i8449; CHECK: LV: Vector loop of width 8 costs: 9.450; CHECK: LV: Found an estimated cost of 6 for VF 16 For instruction: %12 = load i8451; CHECK: LV: Found an estimated cost of 48 for VF 16 For instruction: %13 = mul i8452; CHECK: LV: Found an estimated cost of 6 for VF 16 For instruction: store i8453; CHECK: LV: Vector loop of width 16 costs: 7.454; CHECK: LV: Selecting VF: 16.455define 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) {456  %5 = icmp eq i32 %3, 0457  br i1 %5, label %6, label %7458 4596:                                                ; preds = %7, %4460  ret void461 4627:                                                ; preds = %4, %7463  %8 = phi i32 [ %21, %7 ], [ 0, %4 ]464  %9 = getelementptr inbounds %struct.TwoBytes, ptr %1, i32 %8465  %10 = load i8, ptr %9, align 1466  %11 = getelementptr inbounds %struct.TwoBytes, ptr %2, i32 %8467  %12 = load i8, ptr %11, align 1468  %13 = mul i8 %12, %10469  %14 = getelementptr inbounds %struct.TwoBytes, ptr %0, i32 %8470  store i8 %13, ptr %14, align 1471  %15 = getelementptr inbounds i8, ptr %9, i32 1472  %16 = load i8, ptr %15, align 1473  %17 = getelementptr inbounds i8, ptr %11, i32 1474  %18 = load i8, ptr %17, align 1475  %19 = mul i8 %18, %16476  %20 = getelementptr inbounds i8, ptr %14, i32 1477  store i8 %19, ptr %20, align 1478  %21 = add nuw i32 %8, 1479  %22 = icmp eq i32 %21, %3480  br i1 %22, label %6, label %7481}482 483; CHECK-LABEL: two_bytes_vary_op484; CHECK: Cost of 11 for VF 4: INTERLEAVE-GROUP with factor 2485; CHECK: Cost of 7 for VF 8: INTERLEAVE-GROUP with factor 2486; CHECK: Cost of 6 for VF 16: INTERLEAVE-GROUP with factor 2487; CHECK: LV: Scalar loop costs: 12.488; CHECK: LV: Found an estimated cost of 6 for VF 2 For instruction: %12 = load i8489; CHECK: LV: Found an estimated cost of 6 for VF 2 For instruction: %13 = mul i8490; CHECK: LV: Found an estimated cost of 6 for VF 2 For instruction: store i8 %13491; CHECK: LV: Vector loop of width 2 costs: 23.492; CHECK: LV: Found an estimated cost of 11 for VF 4 For instruction: %10 = load i8493; CHECK: LV: Found an estimated cost of 12 for VF 4 For instruction: %13 = mul i8494; CHECK: LV: Found an estimated cost of 11 for VF 4 For instruction: store i8495; CHECK: LV: Vector loop of width 4 costs: 12.496; CHECK: LV: Found an estimated cost of 7 for VF 8 For instruction: %12 = load i8497; CHECK: LV: Found an estimated cost of 24 for VF 8 For instruction: %13 = mul i8498; CHECK: LV: Found an estimated cost of 7 for VF 8 For instruction: store i8499; CHECK: LV: Vector loop of width 8 costs: 6.500; CHECK: LV: Found an estimated cost of 6 for VF 16 For instruction: %12 = load i8501; CHECK: LV: Found an estimated cost of 48 for VF 16 For instruction: %13 = mul i8502; CHECK: LV: Found an estimated cost of 6 for VF 16 For instruction: store i8 %19503; CHECK: LV: Vector loop of width 16 costs: 4.504; CHECK: LV: Selecting VF: 16.505define 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) {506  %5 = icmp eq i32 %3, 0507  br i1 %5, label %6, label %7508 5096:                                                ; preds = %7, %4510  ret void511 5127:                                                ; preds = %4, %7513  %8 = phi i32 [ %21, %7 ], [ 0, %4 ]514  %9 = getelementptr inbounds %struct.TwoBytes, ptr %1, i32 %8515  %10 = load i8, ptr %9, align 1516  %11 = getelementptr inbounds %struct.TwoBytes, ptr %2, i32 %8517  %12 = load i8, ptr %11, align 1518  %13 = mul i8 %12, %10519  %14 = getelementptr inbounds %struct.TwoBytes, ptr %0, i32 %8520  store i8 %13, ptr %14, align 1521  %15 = getelementptr inbounds i8, ptr %9, i32 1522  %16 = load i8, ptr %15, align 1523  %17 = getelementptr inbounds i8, ptr %11, i32 1524  %18 = load i8, ptr %17, align 1525  %19 = sub i8 %16, %18526  %20 = getelementptr inbounds i8, ptr %14, i32 1527  store i8 %19, ptr %20, align 1528  %21 = add nuw i32 %8, 1529  %22 = icmp eq i32 %21, %3530  br i1 %22, label %6, label %7531}532 533; CHECK-LABEL: three_bytes_same_op534; CHECK: Cost of 50 for VF 8: INTERLEAVE-GROUP with factor 3 at %10535; CHECK: Cost of 100 for VF 16: INTERLEAVE-GROUP with factor 3 at %10536; CHECK: LV: Scalar loop costs: 16.537; CHECK: LV: Vector loop of width 2 costs: 30.538; CHECK: LV: Vector loop of width 4 costs: 28.539; CHECK: LV: Found an estimated cost of 50 for VF 8 For instruction: %10 = load i8, ptr %9540; CHECK: LV: Found an estimated cost of 50 for VF 8 For instruction: %12 = load i8, ptr %11541; CHECK: LV: Found an estimated cost of 50 for VF 8 For instruction: store i8 %25542; CHECK: LV: Vector loop of width 8 costs: 19.543; CHECK: LV: Found an estimated cost of 100 for VF 16 For instruction: %10 = load i8, ptr %9544; CHECK: LV: Found an estimated cost of 100 for VF 16 For instruction: %12 = load i8, ptr %11545; CHECK: LV: Found an estimated cost of 100 for VF 16 For instruction: store i8 %25546; CHECK: LV: Vector loop of width 16 costs: 19.547; CHECK: LV: Selecting VF: 1.548define 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) {549  %5 = icmp eq i32 %3, 0550  br i1 %5, label %6, label %7551 5526:                                                ; preds = %7, %4553  ret void554 5557:                                                ; preds = %4, %7556  %8 = phi i32 [ %27, %7 ], [ 0, %4 ]557  %9 = getelementptr inbounds %struct.ThreeBytes, ptr %1, i32 %8558  %10 = load i8, ptr %9, align 1559  %11 = getelementptr inbounds %struct.ThreeBytes, ptr %2, i32 %8560  %12 = load i8, ptr %11, align 1561  %13 = and i8 %12, %10562  %14 = getelementptr inbounds %struct.ThreeBytes, ptr %0, i32 %8563  store i8 %13, ptr %14, align 1564  %15 = getelementptr inbounds i8, ptr %9, i32 1565  %16 = load i8, ptr %15, align 1566  %17 = getelementptr inbounds i8, ptr %11, i32 1567  %18 = load i8, ptr %17, align 1568  %19 = and i8 %18, %16569  %20 = getelementptr inbounds i8, ptr %14, i32 1570  store i8 %19, ptr %20, align 1571  %21 = getelementptr inbounds i8, ptr %9, i32 2572  %22 = load i8, ptr %21, align 1573  %23 = getelementptr inbounds i8, ptr %11, i32 2574  %24 = load i8, ptr %23, align 1575  %25 = and i8 %24, %22576  %26 = getelementptr inbounds i8, ptr %14, i32 2577  store i8 %25, ptr %26, align 1578  %27 = add nuw i32 %8, 1579  %28 = icmp eq i32 %27, %3580  br i1 %28, label %6, label %7581}582 583; CHECK-LABEL: three_bytes_interleave_op584; CHECK: Cost of 50 for VF 8: INTERLEAVE-GROUP with factor 3 at %10, ir<%9>585; CHECK: Cost of 100 for VF 16: INTERLEAVE-GROUP with factor 3 at %10, ir<%9>586; CHECK: LV: Scalar loop costs: 16.587; CHECK: LV: Vector loop of width 2 costs: 30.588; CHECK: LV: Vector loop of width 4 costs: 28.589; CHECK: LV: Found an estimated cost of 50 for VF 8 For instruction: %10 = load i8, ptr %9590; CHECK: LV: Found an estimated cost of 50 for VF 8 For instruction: %12 = load i8, ptr %11591; CHECK: LV: Found an estimated cost of 50 for VF 8 For instruction: store i8 %25592; CHECK: LV: Vector loop of width 8 costs: 19.593; CHECK: LV: Found an estimated cost of 100 for VF 16 For instruction: %10 = load i8, ptr %9594; CHECK: LV: Found an estimated cost of 100 for VF 16 For instruction: %12 = load i8, ptr %11595; CHECK: LV: Found an estimated cost of 100 for VF 16 For instruction: store i8 %25596; CHECK: LV: Vector loop of width 16 costs: 19.597; CHECK: LV: Selecting VF: 1.598define 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) {599  %5 = icmp eq i32 %3, 0600  br i1 %5, label %6, label %7601 6026:                                                ; preds = %7, %4603  ret void604 6057:                                                ; preds = %4, %7606  %8 = phi i32 [ %27, %7 ], [ 0, %4 ]607  %9 = getelementptr inbounds %struct.ThreeBytes, ptr %1, i32 %8608  %10 = load i8, ptr %9, align 1609  %11 = getelementptr inbounds %struct.ThreeBytes, ptr %2, i32 %8610  %12 = load i8, ptr %11, align 1611  %13 = add i8 %12, %10612  %14 = getelementptr inbounds %struct.ThreeBytes, ptr %0, i32 %8613  store i8 %13, ptr %14, align 1614  %15 = getelementptr inbounds i8, ptr %9, i32 1615  %16 = load i8, ptr %15, align 1616  %17 = getelementptr inbounds i8, ptr %11, i32 1617  %18 = load i8, ptr %17, align 1618  %19 = sub i8 %16, %18619  %20 = getelementptr inbounds i8, ptr %14, i32 1620  store i8 %19, ptr %20, align 1621  %21 = getelementptr inbounds i8, ptr %9, i32 2622  %22 = load i8, ptr %21, align 1623  %23 = getelementptr inbounds i8, ptr %11, i32 2624  %24 = load i8, ptr %23, align 1625  %25 = add i8 %24, %22626  %26 = getelementptr inbounds i8, ptr %14, i32 2627  store i8 %25, ptr %26, align 1628  %27 = add nuw i32 %8, 1629  %28 = icmp eq i32 %27, %3630  br i1 %28, label %6, label %7631}632 633; CHECK-LABEL: four_bytes_same_op634; CHECK: Cost of 18 for VF 4: INTERLEAVE-GROUP with factor 4635; CHECK: Cost of 26 for VF 8: INTERLEAVE-GROUP with factor 4 636; CHECK: Cost of 132 for VF 16: INTERLEAVE-GROUP with factor 4637; CHECK: LV: Scalar loop costs: 20.638; CHECK: LV: Vector loop of width 2 costs: 40.639; CHECK: LV: Found an estimated cost of 18 for VF 4 For instruction: %10 = load i8640; CHECK: LV: Found an estimated cost of 18 for VF 4 For instruction: %12 = load i8641; CHECK: LV: Found an estimated cost of 18 for VF 4 For instruction: store i8642; CHECK: LV: Vector loop of width 4 costs: 15.643; CHECK: LV: Found an estimated cost of 26 for VF 8 For instruction: %10 = load i8644; CHECK: LV: Found an estimated cost of 26 for VF 8 For instruction: %12 = load i8645; CHECK: LV: Found an estimated cost of 26 for VF 8 For instruction: store i8646; CHECK: LV: Vector loop of width 8 costs: 10.647; CHECK: LV: Found an estimated cost of 132 for VF 16 For instruction: %10 = load i8648; CHECK: LV: Found an estimated cost of 132 for VF 16 For instruction: %12 = load i8649; CHECK: LV: Found an estimated cost of 132 for VF 16 For instruction: store i8650; CHECK: LV: Vector loop of width 16 costs: 25.651; CHECK: LV: Selecting VF: 8.652define 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) {653  %5 = icmp eq i32 %3, 0654  br i1 %5, label %6, label %7655 6566:                                                ; preds = %7, %4657  ret void658 6597:                                                ; preds = %4, %7660  %8 = phi i32 [ %33, %7 ], [ 0, %4 ]661  %9 = getelementptr inbounds %struct.FourBytes, ptr %1, i32 %8662  %10 = load i8, ptr %9, align 1663  %11 = getelementptr inbounds %struct.FourBytes, ptr %2, i32 %8664  %12 = load i8, ptr %11, align 1665  %13 = and i8 %12, %10666  %14 = getelementptr inbounds %struct.FourBytes, ptr %0, i32 %8667  store i8 %13, ptr %14, align 1668  %15 = getelementptr inbounds i8, ptr %9, i32 1669  %16 = load i8, ptr %15, align 1670  %17 = getelementptr inbounds i8, ptr %11, i32 1671  %18 = load i8, ptr %17, align 1672  %19 = and i8 %18, %16673  %20 = getelementptr inbounds i8, ptr %14, i32 1674  store i8 %19, ptr %20, align 1675  %21 = getelementptr inbounds i8, ptr %9, i32 2676  %22 = load i8, ptr %21, align 1677  %23 = getelementptr inbounds i8, ptr %11, i32 2678  %24 = load i8, ptr %23, align 1679  %25 = and i8 %24, %22680  %26 = getelementptr inbounds i8, ptr %14, i32 2681  store i8 %25, ptr %26, align 1682  %27 = getelementptr inbounds i8, ptr %9, i32 3683  %28 = load i8, ptr %27, align 1684  %29 = getelementptr inbounds i8, ptr %11, i32 3685  %30 = load i8, ptr %29, align 1686  %31 = and i8 %30, %28687  %32 = getelementptr inbounds i8, ptr %14, i32 3688  store i8 %31, ptr %32, align 1689  %33 = add nuw i32 %8, 1690  %34 = icmp eq i32 %33, %3691  br i1 %34, label %6, label %7692}693 694; CHECK-LABEL: four_bytes_split_op695; CHECK: Cost of 18 for VF 4: INTERLEAVE-GROUP with factor 4696; CHECK: Cost of 26 for VF 8: INTERLEAVE-GROUP with factor 4 697; CHECK: Cost of 132 for VF 16: INTERLEAVE-GROUP with factor 4698; CHECK: LV: Scalar loop costs: 20.699; CHECK: LV: Vector loop of width 2 costs: 45.700; CHECK: LV: Found an estimated cost of 18 for VF 4 For instruction: %10 = load i8701; CHECK: LV: Found an estimated cost of 18 for VF 4 For instruction: %12 = load i8702; CHECK: LV: Found an estimated cost of 12 for VF 4 For instruction: %13 = mul i8703; CHECK: LV: Found an estimated cost of 18 for VF 4 For instruction: store i8704; CHECK: LV: Vector loop of width 4 costs: 21.705; CHECK: LV: Found an estimated cost of 26 for VF 8 For instruction: %10 = load i8706; CHECK: LV: Found an estimated cost of 26 for VF 8 For instruction: %12 = load i8707; CHECK: LV: Found an estimated cost of 24 for VF 8 For instruction: %13 = mul i8708; CHECK: LV: Found an estimated cost of 26 for VF 8 For instruction: store i8709; CHECK: LV: Vector loop of width 8 costs: 16.710; CHECK: LV: Found an estimated cost of 132 for VF 16 For instruction: %10 = load i8711; CHECK: LV: Found an estimated cost of 132 for VF 16 For instruction: %12 = load i8712; CHECK: LV: Found an estimated cost of 48 for VF 16 For instruction: %13 = mul i8713; CHECK: LV: Found an estimated cost of 132 for VF 16 For instruction: store i8714; CHECK: LV: Vector loop of width 16 costs: 31715; CHECK: LV: Selecting VF: 8716define 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) {717  %5 = icmp eq i32 %3, 0718  br i1 %5, label %6, label %7719 7206:                                                ; preds = %7, %4721  ret void722 7237:                                                ; preds = %4, %7724  %8 = phi i32 [ %33, %7 ], [ 0, %4 ]725  %9 = getelementptr inbounds %struct.FourBytes, ptr %1, i32 %8726  %10 = load i8, ptr %9, align 1727  %11 = getelementptr inbounds %struct.FourBytes, ptr %2, i32 %8728  %12 = load i8, ptr %11, align 1729  %13 = mul i8 %12, %10730  %14 = getelementptr inbounds %struct.FourBytes, ptr %0, i32 %8731  store i8 %13, ptr %14, align 1732  %15 = getelementptr inbounds i8, ptr %9, i32 1733  %16 = load i8, ptr %15, align 1734  %17 = getelementptr inbounds i8, ptr %11, i32 1735  %18 = load i8, ptr %17, align 1736  %19 = mul i8 %18, %16737  %20 = getelementptr inbounds i8, ptr %14, i32 1738  store i8 %19, ptr %20, align 1739  %21 = getelementptr inbounds i8, ptr %9, i32 2740  %22 = load i8, ptr %21, align 1741  %23 = getelementptr inbounds i8, ptr %11, i32 2742  %24 = load i8, ptr %23, align 1743  %25 = sub i8 %22, %24744  %26 = getelementptr inbounds i8, ptr %14, i32 2745  store i8 %25, ptr %26, align 1746  %27 = getelementptr inbounds i8, ptr %9, i32 3747  %28 = load i8, ptr %27, align 1748  %29 = getelementptr inbounds i8, ptr %11, i32 3749  %30 = load i8, ptr %29, align 1750  %31 = sub i8 %28, %30751  %32 = getelementptr inbounds i8, ptr %14, i32 3752  store i8 %31, ptr %32, align 1753  %33 = add nuw i32 %8, 1754  %34 = icmp eq i32 %33, %3755  br i1 %34, label %6, label %7756}757 758 759; CHECK-LABEL: four_bytes_interleave_op760; CHECK: Cost of 18 for VF 4: INTERLEAVE-GROUP with factor 4761; CHECK: Cost of 26 for VF 8: INTERLEAVE-GROUP with factor 4 762; CHECK: Cost of 132 for VF 16: INTERLEAVE-GROUP with factor 4763; CHECK: LV: Scalar loop costs: 20.764; CHECK: LV: Vector loop of width 2 costs: 40765; CHECK: LV: Found an estimated cost of 18 for VF 4 For instruction: %10 = load i8766; CHECK: LV: Found an estimated cost of 18 for VF 4 For instruction: %12 = load i8767; CHECK: LV: Found an estimated cost of 18 for VF 4 For instruction: store i8768; CHECK: LV: Vector loop of width 4 costs: 15769; CHECK: LV: Found an estimated cost of 26 for VF 8 For instruction: %10 = load i8770; CHECK: LV: Found an estimated cost of 26 for VF 8 For instruction: %12 = load i8771; CHECK: LV: Found an estimated cost of 26 for VF 8 For instruction: store i8772; CHECK: LV: Vector loop of width 8 costs: 10773; CHECK: LV: Found an estimated cost of 132 for VF 16 For instruction: %10 = load i8774; CHECK: LV: Found an estimated cost of 132 for VF 16 For instruction: %12 = load i8775; CHECK: LV: Found an estimated cost of 132 for VF 16 For instruction: store i8776; CHECK: LV: Vector loop of width 16 costs: 25777; CHECK: LV: Selecting VF: 8778define 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) {779  %5 = icmp eq i32 %3, 0780  br i1 %5, label %6, label %7781 7826:                                                ; preds = %7, %4783  ret void784 7857:                                                ; preds = %4, %7786  %8 = phi i32 [ %33, %7 ], [ 0, %4 ]787  %9 = getelementptr inbounds %struct.FourBytes, ptr %1, i32 %8788  %10 = load i8, ptr %9, align 1789  %11 = getelementptr inbounds %struct.FourBytes, ptr %2, i32 %8790  %12 = load i8, ptr %11, align 1791  %13 = add i8 %12, %10792  %14 = getelementptr inbounds %struct.FourBytes, ptr %0, i32 %8793  store i8 %13, ptr %14, align 1794  %15 = getelementptr inbounds i8, ptr %9, i32 1795  %16 = load i8, ptr %15, align 1796  %17 = getelementptr inbounds i8, ptr %11, i32 1797  %18 = load i8, ptr %17, align 1798  %19 = sub i8 %16, %18799  %20 = getelementptr inbounds i8, ptr %14, i32 1800  store i8 %19, ptr %20, align 1801  %21 = getelementptr inbounds i8, ptr %9, i32 2802  %22 = load i8, ptr %21, align 1803  %23 = getelementptr inbounds i8, ptr %11, i32 2804  %24 = load i8, ptr %23, align 1805  %25 = add i8 %24, %22806  %26 = getelementptr inbounds i8, ptr %14, i32 2807  store i8 %25, ptr %26, align 1808  %27 = getelementptr inbounds i8, ptr %9, i32 3809  %28 = load i8, ptr %27, align 1810  %29 = getelementptr inbounds i8, ptr %11, i32 3811  %30 = load i8, ptr %29, align 1812  %31 = sub i8 %28, %30813  %32 = getelementptr inbounds i8, ptr %14, i32 3814  store i8 %31, ptr %32, align 1815  %33 = add nuw i32 %8, 1816  %34 = icmp eq i32 %33, %3817  br i1 %34, label %6, label %7818}819 820 821; CHECK-LABEL: eight_bytes_same_op822; CHECK: Cost of 34 for VF 2: INTERLEAVE-GROUP with factor 8823; CHECK: Cost of 66 for VF 4: INTERLEAVE-GROUP with factor 8824; CHECK: Cost of 132 for VF 8: INTERLEAVE-GROUP with factor 8825; CHECK: LV: Found an estimated cost of 66 for VF 4 For instruction: %10 = load i8826; CHECK: LV: Found an estimated cost of 66 for VF 4 For instruction: %12 = load i8827; CHECK: LV: Found an estimated cost of 66 for VF 4 For instruction: store i8 %55828; CHECK: LV: Vector loop of width 4 costs: 74829; CHECK: LV: Found an estimated cost of 132 for VF 8 For instruction: %10 = load i8830; CHECK: LV: Found an estimated cost of 132 for VF 8 For instruction: %12 = load i8831; CHECK: LV: Found an estimated cost of 132 for VF 8 For instruction: store i8 %55832; CHECK: LV: Vector loop of width 8 costs: 74833; CHECK: LV: Found an estimated cost of 264 for VF 16 For instruction: %10 = load i8834; CHECK: LV: Found an estimated cost of 264 for VF 16 For instruction: %12 = load i8835; CHECK: LV: Found an estimated cost of 264 for VF 16 For instruction: store i8 %55836; CHECK: LV: Vector loop of width 16 costs: 73837; CHECK: LV: Selecting VF: 1838define 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) {839  %5 = icmp eq i32 %3, 0840  br i1 %5, label %6, label %7841 8426:                                                ; preds = %7, %4843  ret void844 8457:                                                ; preds = %4, %7846  %8 = phi i32 [ %57, %7 ], [ 0, %4 ]847  %9 = getelementptr inbounds %struct.EightBytes, ptr %1, i32 %8848  %10 = load i8, ptr %9, align 1849  %11 = getelementptr inbounds %struct.EightBytes, ptr %2, i32 %8850  %12 = load i8, ptr %11, align 1851  %13 = mul i8 %12, %10852  %14 = getelementptr inbounds %struct.EightBytes, ptr %0, i32 %8853  store i8 %13, ptr %14, align 1854  %15 = getelementptr inbounds i8, ptr %9, i32 1855  %16 = load i8, ptr %15, align 1856  %17 = getelementptr inbounds i8, ptr %11, i32 1857  %18 = load i8, ptr %17, align 1858  %19 = mul i8 %18, %16859  %20 = getelementptr inbounds i8, ptr %14, i32 1860  store i8 %19, ptr %20, align 1861  %21 = getelementptr inbounds i8, ptr %9, i32 2862  %22 = load i8, ptr %21, align 1863  %23 = getelementptr inbounds i8, ptr %11, i32 2864  %24 = load i8, ptr %23, align 1865  %25 = mul i8 %24, %22866  %26 = getelementptr inbounds i8, ptr %14, i32 2867  store i8 %25, ptr %26, align 1868  %27 = getelementptr inbounds i8, ptr %9, i32 3869  %28 = load i8, ptr %27, align 1870  %29 = getelementptr inbounds i8, ptr %11, i32 3871  %30 = load i8, ptr %29, align 1872  %31 = mul i8 %30, %28873  %32 = getelementptr inbounds i8, ptr %14, i32 3874  store i8 %31, ptr %32, align 1875  %33 = getelementptr inbounds i8, ptr %9, i32 4876  %34 = load i8, ptr %33, align 1877  %35 = getelementptr inbounds i8, ptr %11, i32 4878  %36 = load i8, ptr %35, align 1879  %37 = mul i8 %36, %34880  %38 = getelementptr inbounds i8, ptr %14, i32 4881  store i8 %37, ptr %38, align 1882  %39 = getelementptr inbounds i8, ptr %9, i32 5883  %40 = load i8, ptr %39, align 1884  %41 = getelementptr inbounds i8, ptr %11, i32 5885  %42 = load i8, ptr %41, align 1886  %43 = mul i8 %42, %40887  %44 = getelementptr inbounds i8, ptr %14, i32 5888  store i8 %43, ptr %44, align 1889  %45 = getelementptr inbounds i8, ptr %9, i32 6890  %46 = load i8, ptr %45, align 1891  %47 = getelementptr inbounds i8, ptr %11, i32 6892  %48 = load i8, ptr %47, align 1893  %49 = mul i8 %48, %46894  %50 = getelementptr inbounds i8, ptr %14, i32 6895  store i8 %49, ptr %50, align 1896  %51 = getelementptr inbounds i8, ptr %9, i32 7897  %52 = load i8, ptr %51, align 1898  %53 = getelementptr inbounds i8, ptr %11, i32 7899  %54 = load i8, ptr %53, align 1900  %55 = mul i8 %54, %52901  %56 = getelementptr inbounds i8, ptr %14, i32 7902  store i8 %55, ptr %56, align 1903  %57 = add nuw i32 %8, 1904  %58 = icmp eq i32 %57, %3905  br i1 %58, label %6, label %7906}907 908; CHECK-LABEL: eight_bytes_split_op909; CHECK: LV: Found an estimated cost of 264 for VF 16 For instruction: %10 = load i8910; CHECK: LV: Found an estimated cost of 264 for VF 16 For instruction: %12 = load i8911; CHECK: LV: Found an estimated cost of 264 for VF 16 For instruction: store i8 %55912; CHECK: LV: Vector loop of width 16 costs: 50913; CHECK: LV: Selecting VF: 1914define 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) {915  %5 = icmp eq i32 %3, 0916  br i1 %5, label %6, label %7917 9186:                                                ; preds = %7, %4919  ret void920 9217:                                                ; preds = %4, %7922  %8 = phi i32 [ %57, %7 ], [ 0, %4 ]923  %9 = getelementptr inbounds %struct.EightBytes, ptr %1, i32 %8924  %10 = load i8, ptr %9, align 1925  %11 = getelementptr inbounds %struct.EightBytes, ptr %2, i32 %8926  %12 = load i8, ptr %11, align 1927  %13 = add i8 %12, %10928  %14 = getelementptr inbounds %struct.EightBytes, ptr %0, i32 %8929  store i8 %13, ptr %14, align 1930  %15 = getelementptr inbounds i8, ptr %9, i32 1931  %16 = load i8, ptr %15, align 1932  %17 = getelementptr inbounds i8, ptr %11, i32 1933  %18 = load i8, ptr %17, align 1934  %19 = add i8 %18, %16935  %20 = getelementptr inbounds i8, ptr %14, i32 1936  store i8 %19, ptr %20, align 1937  %21 = getelementptr inbounds i8, ptr %9, i32 2938  %22 = load i8, ptr %21, align 1939  %23 = getelementptr inbounds i8, ptr %11, i32 2940  %24 = load i8, ptr %23, align 1941  %25 = add i8 %24, %22942  %26 = getelementptr inbounds i8, ptr %14, i32 2943  store i8 %25, ptr %26, align 1944  %27 = getelementptr inbounds i8, ptr %9, i32 3945  %28 = load i8, ptr %27, align 1946  %29 = getelementptr inbounds i8, ptr %11, i32 3947  %30 = load i8, ptr %29, align 1948  %31 = add i8 %30, %28949  %32 = getelementptr inbounds i8, ptr %14, i32 3950  store i8 %31, ptr %32, align 1951  %33 = getelementptr inbounds i8, ptr %9, i32 4952  %34 = load i8, ptr %33, align 1953  %35 = getelementptr inbounds i8, ptr %11, i32 4954  %36 = load i8, ptr %35, align 1955  %37 = sub i8 %34, %36956  %38 = getelementptr inbounds i8, ptr %14, i32 4957  store i8 %37, ptr %38, align 1958  %39 = getelementptr inbounds i8, ptr %9, i32 5959  %40 = load i8, ptr %39, align 1960  %41 = getelementptr inbounds i8, ptr %11, i32 5961  %42 = load i8, ptr %41, align 1962  %43 = sub i8 %40, %42963  %44 = getelementptr inbounds i8, ptr %14, i32 5964  store i8 %43, ptr %44, align 1965  %45 = getelementptr inbounds i8, ptr %9, i32 6966  %46 = load i8, ptr %45, align 1967  %47 = getelementptr inbounds i8, ptr %11, i32 6968  %48 = load i8, ptr %47, align 1969  %49 = sub i8 %46, %48970  %50 = getelementptr inbounds i8, ptr %14, i32 6971  store i8 %49, ptr %50, align 1972  %51 = getelementptr inbounds i8, ptr %9, i32 7973  %52 = load i8, ptr %51, align 1974  %53 = getelementptr inbounds i8, ptr %11, i32 7975  %54 = load i8, ptr %53, align 1976  %55 = sub i8 %52, %54977  %56 = getelementptr inbounds i8, ptr %14, i32 7978  store i8 %55, ptr %56, align 1979  %57 = add nuw i32 %8, 1980  %58 = icmp eq i32 %57, %3981  br i1 %58, label %6, label %7982}983 984; CHECK-LABEL: eight_bytes_interleave_op985; CHECK: LV: Found an estimated cost of 264 for VF 16 For instruction: %10 = load i8986; CHECK: LV: Found an estimated cost of 264 for VF 16 For instruction: %12 = load i8987; CHECK: LV: Found an estimated cost of 264 for VF 16 For instruction: store i8 %55988; CHECK: LV: Vector loop of width 16 costs: 50989; CHECK: LV: Selecting VF: 1990define 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) {991  %5 = icmp eq i32 %3, 0992  br i1 %5, label %6, label %7993 9946:                                                ; preds = %7, %4995  ret void996 9977:                                                ; preds = %4, %7998  %8 = phi i32 [ %57, %7 ], [ 0, %4 ]999  %9 = getelementptr inbounds %struct.EightBytes, ptr %1, i32 %81000  %10 = load i8, ptr %9, align 11001  %11 = getelementptr inbounds %struct.EightBytes, ptr %2, i32 %81002  %12 = load i8, ptr %11, align 11003  %13 = add i8 %12, %101004  %14 = getelementptr inbounds %struct.EightBytes, ptr %0, i32 %81005  store i8 %13, ptr %14, align 11006  %15 = getelementptr inbounds i8, ptr %9, i32 11007  %16 = load i8, ptr %15, align 11008  %17 = getelementptr inbounds i8, ptr %11, i32 11009  %18 = load i8, ptr %17, align 11010  %19 = sub i8 %16, %181011  %20 = getelementptr inbounds i8, ptr %14, i32 11012  store i8 %19, ptr %20, align 11013  %21 = getelementptr inbounds i8, ptr %9, i32 21014  %22 = load i8, ptr %21, align 11015  %23 = getelementptr inbounds i8, ptr %11, i32 21016  %24 = load i8, ptr %23, align 11017  %25 = add i8 %24, %221018  %26 = getelementptr inbounds i8, ptr %14, i32 21019  store i8 %25, ptr %26, align 11020  %27 = getelementptr inbounds i8, ptr %9, i32 31021  %28 = load i8, ptr %27, align 11022  %29 = getelementptr inbounds i8, ptr %11, i32 31023  %30 = load i8, ptr %29, align 11024  %31 = sub i8 %28, %301025  %32 = getelementptr inbounds i8, ptr %14, i32 31026  store i8 %31, ptr %32, align 11027  %33 = getelementptr inbounds i8, ptr %9, i32 41028  %34 = load i8, ptr %33, align 11029  %35 = getelementptr inbounds i8, ptr %11, i32 41030  %36 = load i8, ptr %35, align 11031  %37 = add i8 %36, %341032  %38 = getelementptr inbounds i8, ptr %14, i32 41033  store i8 %37, ptr %38, align 11034  %39 = getelementptr inbounds i8, ptr %9, i32 51035  %40 = load i8, ptr %39, align 11036  %41 = getelementptr inbounds i8, ptr %11, i32 51037  %42 = load i8, ptr %41, align 11038  %43 = sub i8 %40, %421039  %44 = getelementptr inbounds i8, ptr %14, i32 51040  store i8 %43, ptr %44, align 11041  %45 = getelementptr inbounds i8, ptr %9, i32 61042  %46 = load i8, ptr %45, align 11043  %47 = getelementptr inbounds i8, ptr %11, i32 61044  %48 = load i8, ptr %47, align 11045  %49 = add i8 %48, %461046  %50 = getelementptr inbounds i8, ptr %14, i32 61047  store i8 %49, ptr %50, align 11048  %51 = getelementptr inbounds i8, ptr %9, i32 71049  %52 = load i8, ptr %51, align 11050  %53 = getelementptr inbounds i8, ptr %11, i32 71051  %54 = load i8, ptr %53, align 11052  %55 = sub i8 %52, %541053  %56 = getelementptr inbounds i8, ptr %14, i32 71054  store i8 %55, ptr %56, align 11055  %57 = add nuw i32 %8, 11056  %58 = icmp eq i32 %57, %31057  br i1 %58, label %6, label %71058}1059 1060; CHECK-LABEL: four_bytes_into_four_ints_same_op1061; CHECK: LV: Scalar loop costs: 28.1062; CHECK: LV: Found an estimated cost of 6 for VF 2 For instruction: %10 = load i81063; CHECK: LV: Found an estimated cost of 14 for VF 2 For instruction: %17 = load i321064; CHECK: LV: Found an estimated cost of 14 for VF 2 For instruction: store i321065; CHECK: LV: Vector loop of width 2 costs: 44.1066; CHECK: LV: Found an estimated cost of 18 for VF 4 For instruction: %10 = load i81067; CHECK: LV: Found an estimated cost of 24 for VF 4 For instruction: %17 = load i321068; CHECK: LV: Found an estimated cost of 24 for VF 4 For instruction: store i321069; CHECK: LV: Vector loop of width 4 costs: 26.1070; CHECK: LV: Selecting VF: 4.1071define 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) {1072  %5 = icmp eq i32 %3, 01073  br i1 %5, label %6, label %71074 10756:                                                ; preds = %7, %41076  ret void1077 10787:                                                ; preds = %4, %71079  %8 = phi i32 [ %49, %7 ], [ 0, %4 ]1080  %9 = getelementptr inbounds %struct.FourBytes, ptr %1, i32 %81081  %10 = load i8, ptr %9, align 11082  %11 = zext i8 %10 to i321083  %12 = getelementptr inbounds %struct.FourBytes, ptr %2, i32 %81084  %13 = load i8, ptr %12, align 11085  %14 = zext i8 %13 to i321086  %15 = mul nuw nsw i32 %14, %111087  %16 = getelementptr inbounds %struct.FourInts, ptr %0, i32 %81088  %17 = load i32, ptr %16, align 41089  %18 = add nsw i32 %15, %171090  store i32 %18, ptr %16, align 41091  %19 = getelementptr inbounds i8, ptr %9, i32 11092  %20 = load i8, ptr %19, align 11093  %21 = zext i8 %20 to i321094  %22 = getelementptr inbounds i8, ptr %12, i32 11095  %23 = load i8, ptr %22, align 11096  %24 = zext i8 %23 to i321097  %25 = mul nuw nsw i32 %24, %211098  %26 = getelementptr inbounds i8, ptr %16, i32 41099  %27 = load i32, ptr %26, align 41100  %28 = add nsw i32 %25, %271101  store i32 %28, ptr %26, align 41102  %29 = getelementptr inbounds i8, ptr %9, i32 21103  %30 = load i8, ptr %29, align 11104  %31 = zext i8 %30 to i321105  %32 = getelementptr inbounds i8, ptr %12, i32 21106  %33 = load i8, ptr %32, align 11107  %34 = zext i8 %33 to i321108  %35 = mul nuw nsw i32 %34, %311109  %36 = getelementptr inbounds i8, ptr %16, i32 81110  %37 = load i32, ptr %36, align 41111  %38 = add nsw i32 %35, %371112  store i32 %38, ptr %36, align 41113  %39 = getelementptr inbounds i8, ptr %9, i32 31114  %40 = load i8, ptr %39, align 11115  %41 = zext i8 %40 to i321116  %42 = getelementptr inbounds i8, ptr %12, i32 31117  %43 = load i8, ptr %42, align 11118  %44 = zext i8 %43 to i321119  %45 = mul nuw nsw i32 %44, %411120  %46 = getelementptr inbounds i8, ptr %16, i32 121121  %47 = load i32, ptr %46, align 41122  %48 = add nsw i32 %45, %471123  store i32 %48, ptr %46, align 41124  %49 = add nuw i32 %8, 11125  %50 = icmp eq i32 %49, %31126  br i1 %50, label %6, label %71127}1128 1129; CHECK-LABEL: four_bytes_into_four_ints_vary_op1130; CHECK: Cost of 14 for VF 2: INTERLEAVE-GROUP with factor 41131; CHECK: Cost of 18 for VF 4: INTERLEAVE-GROUP with factor 41132; CHECK: Cost of 24 for VF 4: INTERLEAVE-GROUP with factor 41133; CHECK: LV: Scalar loop costs: 21.1134; CHECK: LV: Found an estimated cost of 6 for VF 2 For instruction: %10 = load i81135; CHECK: LV: Found an estimated cost of 0 for VF 2 For instruction: %11 = zext i81136; CHECK: LV: Found an estimated cost of 14 for VF 2 For instruction: store i321137; CHECK: LV: Vector loop of width 2 costs: 35.1138; CHECK: LV: Found an estimated cost of 18 for VF 4 For instruction: %10 = load i81139; CHECK: LV: Found an estimated cost of 2 for VF 4 For instruction:  %11 = zext i81140; CHECK: LV: Found an estimated cost of 24 for VF 4 For instruction: store i321141; CHECK: LV: Vector loop of width 4 costs: 20.1142; CHECK: LV: Selecting VF: 4.1143define 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) {1144  %5 = icmp eq i32 %3, 01145  br i1 %5, label %6, label %71146 11476:                                                ; preds = %7, %41148  ret void1149 11507:                                                ; preds = %4, %71151  %8 = phi i32 [ %40, %7 ], [ 0, %4 ]1152  %9 = getelementptr inbounds %struct.FourBytes, ptr %1, i32 %81153  %10 = load i8, ptr %9, align 11154  %11 = zext i8 %10 to i321155  %12 = getelementptr inbounds %struct.FourBytes, ptr %2, i32 %81156  %13 = load i8, ptr %12, align 11157  %14 = zext i8 %13 to i321158  %15 = add nuw nsw i32 %14, %111159  %16 = getelementptr inbounds %struct.FourInts, ptr %0, i32 %81160  store i32 %15, ptr %16, align 41161  %17 = getelementptr inbounds i8, ptr %9, i32 11162  %18 = load i8, ptr %17, align 11163  %19 = zext i8 %18 to i321164  %20 = getelementptr inbounds i8, ptr %12, i32 11165  %21 = load i8, ptr %20, align 11166  %22 = zext i8 %21 to i321167  %23 = sub nsw i32 %19, %221168  %24 = getelementptr inbounds i8, ptr %16, i32 41169  store i32 %23, ptr %24, align 41170  %25 = getelementptr inbounds i8, ptr %9, i32 21171  %26 = load i8, ptr %25, align 11172  %27 = zext i8 %26 to i321173  %28 = getelementptr inbounds i8, ptr %12, i32 21174  %29 = load i8, ptr %28, align 11175  %30 = zext i8 %29 to i321176  %31 = mul nuw nsw i32 %30, %271177  %32 = getelementptr inbounds i8, ptr %16, i32 81178  store i32 %31, ptr %32, align 41179  %33 = getelementptr inbounds i8, ptr %9, i32 31180  %34 = load i8, ptr %33, align 11181  %35 = getelementptr inbounds i8, ptr %12, i32 31182  %36 = load i8, ptr %35, align 11183  %37 = and i8 %36, %341184  %38 = zext i8 %37 to i321185  %39 = getelementptr inbounds i8, ptr %16, i32 121186  store i32 %38, ptr %39, align 41187  %40 = add nuw i32 %8, 11188  %41 = icmp eq i32 %40, %31189  br i1 %41, label %6, label %71190}1191 1192; CHECK-LABEL: scale_uv_row_down21193; CHECK: LV: Scalar loop costs: 10.1194; CHECK: LV: Vector loop of width 2 costs: 13.1195; CHECK: LV: Vector loop of width 4 costs: 8.1196; CHECK: LV: Vector loop of width 8 costs: 4.1197; CHECK: LV: Vector loop of width 16 costs: 5.1198; CHECK: LV: Selecting VF: 8.1199define hidden void @scale_uv_row_down2(ptr nocapture noundef readonly %0, i32 noundef %1, ptr nocapture noundef writeonly %2, i32 noundef %3) {1200  %5 = icmp sgt i32 %3, 01201  br i1 %5, label %6, label %191202 12036:                                                ; preds = %4, %61204  %7 = phi i32 [ %17, %6 ], [ 0, %4 ]1205  %8 = phi ptr [ %15, %6 ], [ %0, %4 ]1206  %9 = phi ptr [ %16, %6 ], [ %2, %4 ]1207  %10 = getelementptr inbounds i8, ptr %8, i32 21208  %11 = load i8, ptr %10, align 11209  store i8 %11, ptr %9, align 11210  %12 = getelementptr inbounds i8, ptr %8, i32 31211  %13 = load i8, ptr %12, align 11212  %14 = getelementptr inbounds i8, ptr %9, i32 11213  store i8 %13, ptr %14, align 11214  %15 = getelementptr inbounds i8, ptr %8, i32 41215  %16 = getelementptr inbounds i8, ptr %9, i32 21216  %17 = add nuw nsw i32 %7, 11217  %18 = icmp eq i32 %17, %31218  br i1 %18, label %19, label %61219 122019:                                               ; preds = %6, %41221  ret void1222}1223 1224; CHECK-LABEL: scale_uv_row_down2_box1225; CHECK: LV: Scalar loop costs: 26.1226; CHECK: LV: Vector loop of width 2 costs: 39.1227; CHECK: LV: Found an estimated cost of 18 for VF 4 For instruction: %14 = load i81228; CHECK: LV: Found an estimated cost of 18 for VF 4 For instruction: %20 = load i81229; CHECK: LV: Found an estimated cost of 11 for VF 4 For instruction: store i8 %481230; CHECK: LV: Vector loop of width 4 costs: 18.1231; CHECK: LV: Found an estimated cost of 26 for VF 8 For instruction: %14 = load i81232; CHECK: LV: Found an estimated cost of 26 for VF 8 For instruction: %20 = load i81233; CHECK: LV: Found an estimated cost of 7 for VF 8 For instruction: store i8 %481234; CHECK: LV: Vector loop of width 8 costs: 11.1235; CHECK: LV: Found an estimated cost of 132 for VF 16 For instruction: %14 = load i81236; CHECK: LV: Found an estimated cost of 132 for VF 16 For instruction: %20 = load i81237; CHECK: LV: Found an estimated cost of 6 for VF 16 For instruction: store i8 %481238; CHECK: LV: Vector loop of width 16 costs: 20.1239; CHECK: LV: Selecting VF: 8.1240define hidden void @scale_uv_row_down2_box(ptr nocapture noundef readonly %0, i32 noundef %1, ptr nocapture noundef writeonly %2, i32 noundef %3) {1241  %5 = icmp sgt i32 %3, 01242  br i1 %5, label %6, label %541243 12446:                                                ; preds = %41245  %7 = add nsw i32 %1, 21246  %8 = add nsw i32 %1, 11247  %9 = add nsw i32 %1, 31248  br label %101249 125010:                                               ; preds = %6, %101251  %11 = phi i32 [ 0, %6 ], [ %52, %10 ]1252  %12 = phi ptr [ %0, %6 ], [ %50, %10 ]1253  %13 = phi ptr [ %2, %6 ], [ %51, %10 ]1254  %14 = load i8, ptr %12, align 11255  %15 = zext i8 %14 to i161256  %16 = getelementptr inbounds i8, ptr %12, i32 21257  %17 = load i8, ptr %16, align 11258  %18 = zext i8 %17 to i161259  %19 = getelementptr inbounds i8, ptr %12, i32 %11260  %20 = load i8, ptr %19, align 11261  %21 = zext i8 %20 to i161262  %22 = getelementptr inbounds i8, ptr %12, i32 %71263  %23 = load i8, ptr %22, align 11264  %24 = zext i8 %23 to i161265  %25 = add nuw nsw i16 %15, 21266  %26 = add nuw nsw i16 %25, %181267  %27 = add nuw nsw i16 %26, %211268  %28 = add nuw nsw i16 %27, %241269  %29 = lshr i16 %28, 21270  %30 = trunc nuw i16 %29 to i81271  store i8 %30, ptr %13, align 11272  %31 = getelementptr inbounds i8, ptr %12, i32 11273  %32 = load i8, ptr %31, align 11274  %33 = zext i8 %32 to i161275  %34 = getelementptr inbounds i8, ptr %12, i32 31276  %35 = load i8, ptr %34, align 11277  %36 = zext i8 %35 to i161278  %37 = getelementptr inbounds i8, ptr %12, i32 %81279  %38 = load i8, ptr %37, align 11280  %39 = zext i8 %38 to i161281  %40 = getelementptr inbounds i8, ptr %12, i32 %91282  %41 = load i8, ptr %40, align 11283  %42 = zext i8 %41 to i161284  %43 = add nuw nsw i16 %33, 21285  %44 = add nuw nsw i16 %43, %361286  %45 = add nuw nsw i16 %44, %391287  %46 = add nuw nsw i16 %45, %421288  %47 = lshr i16 %46, 21289  %48 = trunc nuw i16 %47 to i81290  %49 = getelementptr inbounds i8, ptr %13, i32 11291  store i8 %48, ptr %49, align 11292  %50 = getelementptr inbounds i8, ptr %12, i32 41293  %51 = getelementptr inbounds i8, ptr %13, i32 21294  %52 = add nuw nsw i32 %11, 11295  %53 = icmp eq i32 %52, %31296  br i1 %53, label %54, label %101297 129854:                                               ; preds = %10, %41299  ret void1300}1301 1302; CHECK-LABEL: scale_uv_row_down2_linear1303; CHECK: LV: Scalar loop costs: 18.1304; CHECK: LV: Found an estimated cost of 6 for VF 2 For instruction: %10 = load i81305; CHECK: LV: Found an estimated cost of 6 for VF 2 For instruction: %13 = load i81306; CHECK: LV: Found an estimated cost of 6 for VF 2 For instruction: store i81307; CHECK: LV: Vector loop of width 2 costs: 25.1308; CHECK: LV: Found an estimated cost of 18 for VF 4 For instruction: %10 = load i81309; CHECK: LV: Found an estimated cost of 11 for VF 4 For instruction: store i81310; CHECK: LV: Vector loop of width 4 costs: 11.1311; CHECK: LV: Found an estimated cost of 26 for VF 8 For instruction: %10 = load i81312; CHECK: LV: Found an estimated cost of 7 for VF 8 For instruction: store i81313; CHECK: LV: Vector loop of width 8 costs: 6.1314; CHECK: LV: Found an estimated cost of 132 for VF 16 For instruction: %10 = load i81315; CHECK: LV: Vector loop of width 16 costs: 10.1316; CHECK: LV: Selecting VF: 8.1317define hidden void @scale_uv_row_down2_linear(ptr nocapture noundef readonly %0, i32 noundef %1, ptr nocapture noundef writeonly %2, i32 noundef %3) {1318  %5 = icmp sgt i32 %3, 01319  br i1 %5, label %6, label %341320 13216:                                                ; preds = %4, %61322  %7 = phi i32 [ %32, %6 ], [ 0, %4 ]1323  %8 = phi ptr [ %30, %6 ], [ %0, %4 ]1324  %9 = phi ptr [ %31, %6 ], [ %2, %4 ]1325  %10 = load i8, ptr %8, align 11326  %11 = zext i8 %10 to i161327  %12 = getelementptr inbounds i8, ptr %8, i32 21328  %13 = load i8, ptr %12, align 11329  %14 = zext i8 %13 to i161330  %15 = add nuw nsw i16 %11, 11331  %16 = add nuw nsw i16 %15, %141332  %17 = lshr i16 %16, 11333  %18 = trunc nuw i16 %17 to i81334  store i8 %18, ptr %9, align 11335  %19 = getelementptr inbounds i8, ptr %8, i32 11336  %20 = load i8, ptr %19, align 11337  %21 = zext i8 %20 to i161338  %22 = getelementptr inbounds i8, ptr %8, i32 31339  %23 = load i8, ptr %22, align 11340  %24 = zext i8 %23 to i161341  %25 = add nuw nsw i16 %21, 11342  %26 = add nuw nsw i16 %25, %241343  %27 = lshr i16 %26, 11344  %28 = trunc nuw i16 %27 to i81345  %29 = getelementptr inbounds i8, ptr %9, i32 11346  store i8 %28, ptr %29, align 11347  %30 = getelementptr inbounds i8, ptr %8, i32 41348  %31 = getelementptr inbounds i8, ptr %9, i32 21349  %32 = add nuw nsw i32 %7, 11350  %33 = icmp eq i32 %32, %31351  br i1 %33, label %34, label %61352 135334:                                               ; preds = %6, %41354  ret void1355}1356 1357; CHECK-LABEL: two_floats_same_op1358; CHECK: LV: Scalar loop costs: 141359; CHECK: Cost of 10 for VF 2: INTERLEAVE-GROUP with factor 21360; CHECK: Cost of 10 for VF 2: INTERLEAVE-GROUP with factor 21361; CHECK: Cost of 10 for VF 2: INTERLEAVE-GROUP with factor 21362; CHECK: Cost of 18 for VF 4: INTERLEAVE-GROUP with factor 21363; CHECK: Cost of 18 for VF 4: INTERLEAVE-GROUP with factor 21364; CHECK: Cost of 18 for VF 4: INTERLEAVE-GROUP with factor 21365; CHECK: LV: Scalar loop costs: 14.1366; CHECK: LV: Vector loop of width 2 costs: 19.1367; CHECK: LV: Vector loop of width 4 costs: 15.1368; CHECK: LV: Selecting VF: 1.1369define 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) {1370entry:1371  %cmp21.not = icmp eq i32 %N, 01372  br i1 %cmp21.not, label %for.cond.cleanup, label %for.body1373 1374for.cond.cleanup:                                 ; preds = %for.body, %entry1375  ret void1376 1377for.body:                                         ; preds = %entry, %for.body1378  %i.022 = phi i32 [ %inc, %for.body ], [ 0, %entry ]1379  %arrayidx = getelementptr inbounds nuw %struct.TwoFloats, ptr %a, i32 %i.0221380  %0 = load float, ptr %arrayidx, align 41381  %arrayidx1 = getelementptr inbounds nuw %struct.TwoFloats, ptr %b, i32 %i.0221382  %1 = load float, ptr %arrayidx1, align 41383  %mul = fmul float %0, %11384  %arrayidx3 = getelementptr inbounds nuw %struct.TwoFloats, ptr %res, i32 %i.0221385  store float %mul, ptr %arrayidx3, align 41386  %y = getelementptr inbounds nuw i8, ptr %arrayidx, i32 41387  %2 = load float, ptr %y, align 41388  %y7 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 41389  %3 = load float, ptr %y7, align 41390  %mul8 = fmul float %2, %31391  %y10 = getelementptr inbounds nuw i8, ptr %arrayidx3, i32 41392  store float %mul8, ptr %y10, align 41393  %inc = add nuw i32 %i.022, 11394  %exitcond.not = icmp eq i32 %inc, %N1395  br i1 %exitcond.not, label %for.cond.cleanup, label %for.body1396}1397 1398; CHECK-LABEL: two_floats_vary_op1399; CHECK: LV: Scalar loop costs: 141400; CHECK: Cost of 10 for VF 2: INTERLEAVE-GROUP with factor 21401; CHECK: Cost of 10 for VF 2: INTERLEAVE-GROUP with factor 21402; CHECK: Cost of 10 for VF 2: INTERLEAVE-GROUP with factor 21403; CHECK: Cost of 18 for VF 4: INTERLEAVE-GROUP with factor 21404; CHECK: Cost of 18 for VF 4: INTERLEAVE-GROUP with factor 21405; CHECK: Cost of 18 for VF 4: INTERLEAVE-GROUP with factor 21406; CHECK: LV: Scalar loop costs: 14.1407; CHECK: LV: Vector loop of width 2 costs: 19.1408; CHECK: LV: Vector loop of width 4 costs: 15.1409; CHECK: LV: Selecting VF: 1.1410define 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) {1411entry:1412  %cmp20.not = icmp eq i32 %N, 01413  br i1 %cmp20.not, label %for.cond.cleanup, label %for.body1414 1415for.cond.cleanup:                                 ; preds = %for.body, %entry1416  ret void1417 1418for.body:                                         ; preds = %entry, %for.body1419  %i.021 = phi i32 [ %inc, %for.body ], [ 0, %entry ]1420  %arrayidx = getelementptr inbounds nuw %struct.TwoFloats, ptr %a, i32 %i.0211421  %0 = load float, ptr %arrayidx, align 41422  %arrayidx1 = getelementptr inbounds nuw %struct.TwoFloats, ptr %b, i32 %i.0211423  %1 = load float, ptr %arrayidx1, align 41424  %add = fadd float %0, %11425  %arrayidx3 = getelementptr inbounds nuw %struct.TwoFloats, ptr %res, i32 %i.0211426  store float %add, ptr %arrayidx3, align 41427  %y = getelementptr inbounds nuw i8, ptr %arrayidx, i32 41428  %2 = load float, ptr %y, align 41429  %y7 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 41430  %3 = load float, ptr %y7, align 41431  %sub = fsub float %2, %31432  %y9 = getelementptr inbounds nuw i8, ptr %arrayidx3, i32 41433  store float %sub, ptr %y9, align 41434  %inc = add nuw i32 %i.021, 11435  %exitcond.not = icmp eq i32 %inc, %N1436  br i1 %exitcond.not, label %for.cond.cleanup, label %for.body1437}1438 1439; CHECK-LABEL: two_bytes_two_floats_same_op1440; CHECK: Cost of 10 for VF 2: INTERLEAVE-GROUP with factor 21441; CHECK: Cost of 11 for VF 4: INTERLEAVE-GROUP with factor 21442; CHECK: Cost of 11 for VF 4: INTERLEAVE-GROUP with factor 21443; CHECK: Cost of 18 for VF 4: INTERLEAVE-GROUP with factor 21444; CHECK: LV: Scalar loop costs: 181445; CHECK: LV: Vector loop of width 2 costs: 271446; CHECK: LV: Vector loop of width 4 costs: 151447; CHECK: LV: Selecting VF: 4.1448define 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) {1449entry:1450  %cmp24.not = icmp eq i32 %N, 01451  br i1 %cmp24.not, label %for.cond.cleanup, label %for.body1452 1453for.cond.cleanup:                                 ; preds = %for.body, %entry1454  ret void1455 1456for.body:                                         ; preds = %entry, %for.body1457  %i.025 = phi i32 [ %inc, %for.body ], [ 0, %entry ]1458  %arrayidx = getelementptr inbounds nuw %struct.TwoBytes, ptr %a, i32 %i.0251459  %0 = load i8, ptr %arrayidx, align 11460  %conv = sitofp i8 %0 to float1461  %arrayidx1 = getelementptr inbounds nuw %struct.TwoBytes, ptr %b, i32 %i.0251462  %1 = load i8, ptr %arrayidx1, align 11463  %conv3 = sitofp i8 %1 to float1464  %mul = fmul float %conv, %conv31465  %arrayidx4 = getelementptr inbounds nuw %struct.TwoFloats, ptr %res, i32 %i.0251466  store float %mul, ptr %arrayidx4, align 41467  %y = getelementptr inbounds nuw i8, ptr %arrayidx, i32 11468  %2 = load i8, ptr %y, align 11469  %conv7 = sitofp i8 %2 to float1470  %y9 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 11471  %3 = load i8, ptr %y9, align 11472  %conv10 = sitofp i8 %3 to float1473  %mul11 = fmul float %conv7, %conv101474  %y13 = getelementptr inbounds nuw i8, ptr %arrayidx4, i32 41475  store float %mul11, ptr %y13, align 41476  %inc = add nuw i32 %i.025, 11477  %exitcond.not = icmp eq i32 %inc, %N1478  br i1 %exitcond.not, label %for.cond.cleanup, label %for.body1479}1480 1481; CHECK-LABEL: two_bytes_two_floats_vary_op1482; CHECK: Cost of 10 for VF 2: INTERLEAVE-GROUP with factor 21483; CHECK: Cost of 11 for VF 4: INTERLEAVE-GROUP with factor 21484; CHECK: Cost of 11 for VF 4: INTERLEAVE-GROUP with factor 21485; CHECK: Cost of 18 for VF 4: INTERLEAVE-GROUP with factor 21486; CHECK: LV: Scalar loop costs: 181487; CHECK: LV: Vector loop of width 2 costs: 271488; CHECK: LV: Vector loop of width 4 costs: 151489; CHECK: LV: Selecting VF: 4.1490define 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) {1491entry:1492  %cmp23.not = icmp eq i32 %N, 01493  br i1 %cmp23.not, label %for.cond.cleanup, label %for.body1494 1495for.cond.cleanup:                                 ; preds = %for.body, %entry1496  ret void1497 1498for.body:                                         ; preds = %entry, %for.body1499  %i.024 = phi i32 [ %inc, %for.body ], [ 0, %entry ]1500  %arrayidx = getelementptr inbounds nuw %struct.TwoBytes, ptr %a, i32 %i.0241501  %0 = load i8, ptr %arrayidx, align 11502  %conv = sitofp i8 %0 to float1503  %arrayidx1 = getelementptr inbounds nuw %struct.TwoBytes, ptr %b, i32 %i.0241504  %1 = load i8, ptr %arrayidx1, align 11505  %conv3 = sitofp i8 %1 to float1506  %add = fadd float %conv, %conv31507  %arrayidx4 = getelementptr inbounds nuw %struct.TwoFloats, ptr %res, i32 %i.0241508  store float %add, ptr %arrayidx4, align 41509  %y = getelementptr inbounds nuw i8, ptr %arrayidx, i32 11510  %2 = load i8, ptr %y, align 11511  %conv7 = sitofp i8 %2 to float1512  %y9 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 11513  %3 = load i8, ptr %y9, align 11514  %conv10 = sitofp i8 %3 to float1515  %sub = fsub float %conv7, %conv101516  %y12 = getelementptr inbounds nuw i8, ptr %arrayidx4, i32 41517  store float %sub, ptr %y12, align 41518  %inc = add nuw i32 %i.024, 11519  %exitcond.not = icmp eq i32 %inc, %N1520  br i1 %exitcond.not, label %for.cond.cleanup, label %for.body1521}1522 1523; CHECK-LABEL: two_floats_two_bytes_same_op1524; CHECK: Cost of 10 for VF 2: INTERLEAVE-GROUP with factor 21525; CHECK: Cost of 18 for VF 4: INTERLEAVE-GROUP with factor 21526; CHECK: Cost of 18 for VF 4: INTERLEAVE-GROUP with factor 21527; CHECK: Cost of 11 for VF 4: INTERLEAVE-GROUP with factor 21528; CHECK: LV: Scalar loop costs: 161529; CHECK: LV: Vector loop of width 2 costs: 261530; CHECK: LV: Vector loop of width 4 costs: 16.1531; CHECK: LV: Selecting VF: 1.1532define 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) {1533entry:1534  %cmp22.not = icmp eq i32 %N, 01535  br i1 %cmp22.not, label %for.cond.cleanup, label %for.body1536 1537for.cond.cleanup:                                 ; preds = %for.body, %entry1538  ret void1539 1540for.body:                                         ; preds = %entry, %for.body1541  %i.023 = phi i32 [ %inc, %for.body ], [ 0, %entry ]1542  %arrayidx = getelementptr inbounds nuw %struct.TwoFloats, ptr %a, i32 %i.0231543  %0 = load float, ptr %arrayidx, align 41544  %arrayidx1 = getelementptr inbounds nuw %struct.TwoFloats, ptr %b, i32 %i.0231545  %1 = load float, ptr %arrayidx1, align 41546  %mul = fmul float %0, %11547  %conv = fptosi float %mul to i81548  %arrayidx3 = getelementptr inbounds nuw %struct.TwoBytes, ptr %res, i32 %i.0231549  store i8 %conv, ptr %arrayidx3, align 11550  %y = getelementptr inbounds nuw i8, ptr %arrayidx, i32 41551  %2 = load float, ptr %y, align 41552  %y7 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 41553  %3 = load float, ptr %y7, align 41554  %mul8 = fmul float %2, %31555  %conv9 = fptosi float %mul8 to i81556  %y11 = getelementptr inbounds nuw i8, ptr %arrayidx3, i32 11557  store i8 %conv9, ptr %y11, align 11558  %inc = add nuw i32 %i.023, 11559  %exitcond.not = icmp eq i32 %inc, %N1560  br i1 %exitcond.not, label %for.cond.cleanup, label %for.body1561}1562 1563; CHECK-LABEL: two_floats_two_bytes_vary_op1564; CHECK: Cost of 10 for VF 2: INTERLEAVE-GROUP with factor 21565; CHECK: Cost of 10 for VF 2: INTERLEAVE-GROUP with factor 21566; CHECK: Cost of 18 for VF 4: INTERLEAVE-GROUP with factor 21567; CHECK: Cost of 18 for VF 4: INTERLEAVE-GROUP with factor 21568; CHECK: LV: Scalar loop costs: 161569; CHECK: LV: Vector loop of width 2 costs: 261570; CHECK: LV: Vector loop of width 4 costs: 16.1571; CHECK: LV: Selecting VF: 1.1572define 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) {1573entry:1574  %cmp21.not = icmp eq i32 %N, 01575  br i1 %cmp21.not, label %for.cond.cleanup, label %for.body1576 1577for.cond.cleanup:                                 ; preds = %for.body, %entry1578  ret void1579 1580for.body:                                         ; preds = %entry, %for.body1581  %i.022 = phi i32 [ %inc, %for.body ], [ 0, %entry ]1582  %arrayidx = getelementptr inbounds nuw %struct.TwoFloats, ptr %a, i32 %i.0221583  %0 = load float, ptr %arrayidx, align 41584  %arrayidx1 = getelementptr inbounds nuw %struct.TwoFloats, ptr %b, i32 %i.0221585  %1 = load float, ptr %arrayidx1, align 41586  %add = fadd float %0, %11587  %conv = fptosi float %add to i81588  %arrayidx3 = getelementptr inbounds nuw %struct.TwoBytes, ptr %res, i32 %i.0221589  store i8 %conv, ptr %arrayidx3, align 11590  %y = getelementptr inbounds nuw i8, ptr %arrayidx, i32 41591  %2 = load float, ptr %y, align 41592  %y7 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 41593  %3 = load float, ptr %y7, align 41594  %sub = fsub float %2, %31595  %conv8 = fptosi float %sub to i81596  %y10 = getelementptr inbounds nuw i8, ptr %arrayidx3, i32 11597  store i8 %conv8, ptr %y10, align 11598  %inc = add nuw i32 %i.022, 11599  %exitcond.not = icmp eq i32 %inc, %N1600  br i1 %exitcond.not, label %for.cond.cleanup, label %for.body1601}1602 1603; CHECK-LABEL: two_shorts_two_floats_same_op1604; CHECK: Cost of 11 for VF 2: INTERLEAVE-GROUP with factor 21605; CHECK: Cost of 11 for VF 2: INTERLEAVE-GROUP with factor 21606; CHECK: Cost of 10 for VF 2: INTERLEAVE-GROUP with factor 21607; CHECK: Cost of 7 for VF 4: INTERLEAVE-GROUP with factor 21608; CHECK: Cost of 7 for VF 4: INTERLEAVE-GROUP with factor 21609; CHECK: Cost of 18 for VF 4: INTERLEAVE-GROUP with factor 21610; CHECK: LV: Scalar loop costs: 181611; CHECK: LV: Vector loop of width 2 costs: 241612; CHECK: LV: Vector loop of width 4 costs: 121613; CHECK: LV: Selecting VF: 4.1614define 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) {1615entry:1616  %cmp24.not = icmp eq i32 %N, 01617  br i1 %cmp24.not, label %for.cond.cleanup, label %for.body1618 1619for.cond.cleanup:                                 ; preds = %for.body, %entry1620  ret void1621 1622for.body:                                         ; preds = %entry, %for.body1623  %i.025 = phi i32 [ %inc, %for.body ], [ 0, %entry ]1624  %arrayidx = getelementptr inbounds nuw %struct.TwoShorts, ptr %a, i32 %i.0251625  %0 = load i16, ptr %arrayidx, align 21626  %conv = sitofp i16 %0 to float1627  %arrayidx1 = getelementptr inbounds nuw %struct.TwoShorts, ptr %b, i32 %i.0251628  %1 = load i16, ptr %arrayidx1, align 21629  %conv3 = sitofp i16 %1 to float1630  %mul = fmul float %conv, %conv31631  %arrayidx4 = getelementptr inbounds nuw %struct.TwoFloats, ptr %res, i32 %i.0251632  store float %mul, ptr %arrayidx4, align 41633  %y = getelementptr inbounds nuw i8, ptr %arrayidx, i32 21634  %2 = load i16, ptr %y, align 21635  %conv7 = sitofp i16 %2 to float1636  %y9 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 21637  %3 = load i16, ptr %y9, align 21638  %conv10 = sitofp i16 %3 to float1639  %mul11 = fmul float %conv7, %conv101640  %y13 = getelementptr inbounds nuw i8, ptr %arrayidx4, i32 41641  store float %mul11, ptr %y13, align 41642  %inc = add nuw i32 %i.025, 11643  %exitcond.not = icmp eq i32 %inc, %N1644  br i1 %exitcond.not, label %for.cond.cleanup, label %for.body1645}1646 1647; CHECK-LABEL: two_shorts_two_floats_vary_op1648; CHECK: Cost of 11 for VF 2: INTERLEAVE-GROUP with factor 21649; CHECK: Cost of 11 for VF 2: INTERLEAVE-GROUP with factor 21650; CHECK: Cost of 10 for VF 2: INTERLEAVE-GROUP with factor 21651; CHECK: Cost of 7 for VF 4: INTERLEAVE-GROUP with factor 21652; CHECK: Cost of 7 for VF 4: INTERLEAVE-GROUP with factor 21653; CHECK: Cost of 18 for VF 4: INTERLEAVE-GROUP with factor 21654; CHECK: LV: Scalar loop costs: 181655; CHECK: LV: Vector loop of width 2 costs: 241656; CHECK: LV: Vector loop of width 4 costs: 121657; CHECK: LV: Selecting VF: 4.1658define 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) {1659entry:1660  %cmp23.not = icmp eq i32 %N, 01661  br i1 %cmp23.not, label %for.cond.cleanup, label %for.body1662 1663for.cond.cleanup:                                 ; preds = %for.body, %entry1664  ret void1665 1666for.body:                                         ; preds = %entry, %for.body1667  %i.024 = phi i32 [ %inc, %for.body ], [ 0, %entry ]1668  %arrayidx = getelementptr inbounds nuw %struct.TwoShorts, ptr %a, i32 %i.0241669  %0 = load i16, ptr %arrayidx, align 21670  %conv = sitofp i16 %0 to float1671  %arrayidx1 = getelementptr inbounds nuw %struct.TwoShorts, ptr %b, i32 %i.0241672  %1 = load i16, ptr %arrayidx1, align 21673  %conv3 = sitofp i16 %1 to float1674  %add = fadd float %conv, %conv31675  %arrayidx4 = getelementptr inbounds nuw %struct.TwoFloats, ptr %res, i32 %i.0241676  store float %add, ptr %arrayidx4, align 41677  %y = getelementptr inbounds nuw i8, ptr %arrayidx, i32 21678  %2 = load i16, ptr %y, align 21679  %conv7 = sitofp i16 %2 to float1680  %y9 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 21681  %3 = load i16, ptr %y9, align 21682  %conv10 = sitofp i16 %3 to float1683  %sub = fsub float %conv7, %conv101684  %y12 = getelementptr inbounds nuw i8, ptr %arrayidx4, i32 41685  store float %sub, ptr %y12, align 41686  %inc = add nuw i32 %i.024, 11687  %exitcond.not = icmp eq i32 %inc, %N1688  br i1 %exitcond.not, label %for.cond.cleanup, label %for.body1689}1690 1691; CHECK-LABEL: two_floats_two_shorts_same_op1692; CHECK: Cost of 10 for VF 2: INTERLEAVE-GROUP with factor 21693; CHECK: Cost of 10 for VF 2: INTERLEAVE-GROUP with factor 21694; CHECK: Cost of 11 for VF 2: INTERLEAVE-GROUP with factor 21695; CHECK: Cost of 18 for VF 4: INTERLEAVE-GROUP with factor 21696; CHECK: Cost of 18 for VF 4: INTERLEAVE-GROUP with factor 21697; CHECK: Cost of 7 for VF 4: INTERLEAVE-GROUP with factor 21698; CHECK: LV: Scalar loop costs: 161699; CHECK: LV: Vector loop of width 2 costs: 231700; CHECK: LV: Vector loop of width 4 costs: 141701; CHECK: LV: Selecting VF: 41702define 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) {1703entry:1704  %cmp22.not = icmp eq i32 %N, 01705  br i1 %cmp22.not, label %for.cond.cleanup, label %for.body1706 1707for.cond.cleanup:                                 ; preds = %for.body, %entry1708  ret void1709 1710for.body:                                         ; preds = %entry, %for.body1711  %i.023 = phi i32 [ %inc, %for.body ], [ 0, %entry ]1712  %arrayidx = getelementptr inbounds nuw %struct.TwoFloats, ptr %a, i32 %i.0231713  %0 = load float, ptr %arrayidx, align 41714  %arrayidx1 = getelementptr inbounds nuw %struct.TwoFloats, ptr %b, i32 %i.0231715  %1 = load float, ptr %arrayidx1, align 41716  %mul = fmul float %0, %11717  %conv = fptosi float %mul to i161718  %arrayidx3 = getelementptr inbounds nuw %struct.TwoShorts, ptr %res, i32 %i.0231719  store i16 %conv, ptr %arrayidx3, align 21720  %y = getelementptr inbounds nuw i8, ptr %arrayidx, i32 41721  %2 = load float, ptr %y, align 41722  %y7 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 41723  %3 = load float, ptr %y7, align 41724  %mul8 = fmul float %2, %31725  %conv9 = fptosi float %mul8 to i161726  %y11 = getelementptr inbounds nuw i8, ptr %arrayidx3, i32 21727  store i16 %conv9, ptr %y11, align 21728  %inc = add nuw i32 %i.023, 11729  %exitcond.not = icmp eq i32 %inc, %N1730  br i1 %exitcond.not, label %for.cond.cleanup, label %for.body1731}1732 1733; CHECK-LABEL: two_floats_two_shorts_vary_op1734; CHECK: Cost of 10 for VF 2: INTERLEAVE-GROUP with factor 21735; CHECK: Cost of 10 for VF 2: INTERLEAVE-GROUP with factor 21736; CHECK: Cost of 11 for VF 2: INTERLEAVE-GROUP with factor 21737; CHECK: Cost of 18 for VF 4: INTERLEAVE-GROUP with factor 21738; CHECK: Cost of 18 for VF 4: INTERLEAVE-GROUP with factor 21739; CHECK: Cost of 7 for VF 4: INTERLEAVE-GROUP with factor 21740; CHECK: LV: Scalar loop costs: 161741; CHECK: LV: Vector loop of width 2 costs: 231742; CHECK: LV: Vector loop of width 4 costs: 141743; CHECK: LV: Selecting VF: 41744define 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) {1745entry:1746  %cmp21.not = icmp eq i32 %N, 01747  br i1 %cmp21.not, label %for.cond.cleanup, label %for.body1748 1749for.cond.cleanup:                                 ; preds = %for.body, %entry1750  ret void1751 1752for.body:                                         ; preds = %entry, %for.body1753  %i.022 = phi i32 [ %inc, %for.body ], [ 0, %entry ]1754  %arrayidx = getelementptr inbounds nuw %struct.TwoFloats, ptr %a, i32 %i.0221755  %0 = load float, ptr %arrayidx, align 41756  %arrayidx1 = getelementptr inbounds nuw %struct.TwoFloats, ptr %b, i32 %i.0221757  %1 = load float, ptr %arrayidx1, align 41758  %add = fadd float %0, %11759  %conv = fptosi float %add to i161760  %arrayidx3 = getelementptr inbounds nuw %struct.TwoShorts, ptr %res, i32 %i.0221761  store i16 %conv, ptr %arrayidx3, align 21762  %y = getelementptr inbounds nuw i8, ptr %arrayidx, i32 41763  %2 = load float, ptr %y, align 41764  %y7 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 41765  %3 = load float, ptr %y7, align 41766  %sub = fsub float %2, %31767  %conv8 = fptosi float %sub to i161768  %y10 = getelementptr inbounds nuw i8, ptr %arrayidx3, i32 21769  store i16 %conv8, ptr %y10, align 21770  %inc = add nuw i32 %i.022, 11771  %exitcond.not = icmp eq i32 %inc, %N1772  br i1 %exitcond.not, label %for.cond.cleanup, label %for.body1773}1774 1775; CHECK-LABEL: four_floats_same_op1776; CHECK: Cost of 18 for VF 2: INTERLEAVE-GROUP with factor 41777; CHECK: Cost of 18 for VF 2: INTERLEAVE-GROUP with factor 41778; CHECK: Cost of 18 for VF 2: INTERLEAVE-GROUP with factor 41779; CHECK: LV: Scalar loop costs: 241780; CHECK: LV: Vector loop of width 2 costs: 331781; CHECK: LV: Vector loop of width 4 costs: 301782; CHECK: LV: Selecting VF: 11783define 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) {1784entry:1785  %cmp45.not = icmp eq i32 %N, 01786  br i1 %cmp45.not, label %for.cond.cleanup, label %for.body1787 1788for.cond.cleanup:                                 ; preds = %for.body, %entry1789  ret void1790 1791for.body:                                         ; preds = %entry, %for.body1792  %i.046 = phi i32 [ %inc, %for.body ], [ 0, %entry ]1793  %arrayidx = getelementptr inbounds nuw %struct.FourFloats, ptr %a, i32 %i.0461794  %0 = load float, ptr %arrayidx, align 41795  %arrayidx1 = getelementptr inbounds nuw %struct.FourFloats, ptr %b, i32 %i.0461796  %1 = load float, ptr %arrayidx1, align 41797  %mul = fmul float %0, %11798  %arrayidx3 = getelementptr inbounds nuw %struct.FourFloats, ptr %res, i32 %i.0461799  store float %mul, ptr %arrayidx3, align 41800  %y = getelementptr inbounds nuw i8, ptr %arrayidx, i32 41801  %2 = load float, ptr %y, align 41802  %y7 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 41803  %3 = load float, ptr %y7, align 41804  %mul8 = fmul float %2, %31805  %y10 = getelementptr inbounds nuw i8, ptr %arrayidx3, i32 41806  store float %mul8, ptr %y10, align 41807  %z = getelementptr inbounds nuw i8, ptr %arrayidx, i32 81808  %4 = load float, ptr %z, align 41809  %z13 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 81810  %5 = load float, ptr %z13, align 41811  %mul14 = fmul float %4, %51812  %z16 = getelementptr inbounds nuw i8, ptr %arrayidx3, i32 81813  store float %mul14, ptr %z16, align 41814  %w = getelementptr inbounds nuw i8, ptr %arrayidx, i32 121815  %6 = load float, ptr %w, align 41816  %w19 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 121817  %7 = load float, ptr %w19, align 41818  %mul20 = fmul float %6, %71819  %w22 = getelementptr inbounds nuw i8, ptr %arrayidx3, i32 121820  store float %mul20, ptr %w22, align 41821  %inc = add nuw i32 %i.046, 11822  %exitcond.not = icmp eq i32 %inc, %N1823  br i1 %exitcond.not, label %for.cond.cleanup, label %for.body1824}1825 1826; CHECK-LABEL: four_floats_vary_op1827; CHECK: Cost of 18 for VF 2: INTERLEAVE-GROUP with factor 41828; CHECK: Cost of 18 for VF 2: INTERLEAVE-GROUP with factor 41829; CHECK: Cost of 18 for VF 2: INTERLEAVE-GROUP with factor 41830; CHECK: Cost of 36 for VF 4: INTERLEAVE-GROUP with factor 41831; CHECK: Cost of 36 for VF 4: INTERLEAVE-GROUP with factor 41832; CHECK: Cost of 36 for VF 4: INTERLEAVE-GROUP with factor 41833; CHECK: LV: Scalar loop costs: 241834; CHECK: LV: Vector loop of width 2 costs: 331835; CHECK: LV: Vector loop of width 4 costs: 301836; CHECK: LV: Selecting VF: 11837define 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) {1838entry:1839  %cmp42.not = icmp eq i32 %N, 01840  br i1 %cmp42.not, label %for.cond.cleanup, label %for.body1841 1842for.cond.cleanup:                                 ; preds = %for.body, %entry1843  ret void1844 1845for.body:                                         ; preds = %entry, %for.body1846  %i.043 = phi i32 [ %inc, %for.body ], [ 0, %entry ]1847  %arrayidx = getelementptr inbounds nuw %struct.FourFloats, ptr %a, i32 %i.0431848  %0 = load float, ptr %arrayidx, align 41849  %arrayidx1 = getelementptr inbounds nuw %struct.FourFloats, ptr %b, i32 %i.0431850  %1 = load float, ptr %arrayidx1, align 41851  %add = fadd float %0, %11852  %arrayidx3 = getelementptr inbounds nuw %struct.FourFloats, ptr %res, i32 %i.0431853  store float %add, ptr %arrayidx3, align 41854  %y = getelementptr inbounds nuw i8, ptr %arrayidx, i32 41855  %2 = load float, ptr %y, align 41856  %y7 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 41857  %3 = load float, ptr %y7, align 41858  %sub = fsub float %2, %31859  %y9 = getelementptr inbounds nuw i8, ptr %arrayidx3, i32 41860  store float %sub, ptr %y9, align 41861  %z = getelementptr inbounds nuw i8, ptr %arrayidx, i32 81862  %4 = load float, ptr %z, align 41863  %z12 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 81864  %5 = load float, ptr %z12, align 41865  %mul = fmul float %4, %51866  %z14 = getelementptr inbounds nuw i8, ptr %arrayidx3, i32 81867  store float %mul, ptr %z14, align 41868  %w = getelementptr inbounds nuw i8, ptr %arrayidx, i32 121869  %6 = load float, ptr %w, align 41870  %w17 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 121871  %7 = load float, ptr %w17, align 41872  %div = fdiv float %6, %71873  %w19 = getelementptr inbounds nuw i8, ptr %arrayidx3, i32 121874  store float %div, ptr %w19, align 41875  %inc = add nuw i32 %i.043, 11876  %exitcond.not = icmp eq i32 %inc, %N1877  br i1 %exitcond.not, label %for.cond.cleanup, label %for.body1878}1879 1880; CHECK-LABEL: four_bytes_four_floats_same_op1881; CHECK: Cost of 18 for VF 2: INTERLEAVE-GROUP with factor 41882; CHECK: Cost of 18 for VF 4: INTERLEAVE-GROUP with factor 41883; CHECK: Cost of 18 for VF 4: INTERLEAVE-GROUP with factor 41884; CHECK: Cost of 36 for VF 4: INTERLEAVE-GROUP with factor 41885; CHECK: LV: Scalar loop costs: 321886; CHECK: LV: Vector loop of width 2 costs: 511887; CHECK: LV: Vector loop of width 4 costs: 271888; CHECK: LV: Selecting VF: 41889define 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) {1890entry:1891  %cmp52.not = icmp eq i32 %N, 01892  br i1 %cmp52.not, label %for.cond.cleanup, label %for.body1893 1894for.cond.cleanup:                                 ; preds = %for.body, %entry1895  ret void1896 1897for.body:                                         ; preds = %entry, %for.body1898  %i.053 = phi i32 [ %inc, %for.body ], [ 0, %entry ]1899  %arrayidx = getelementptr inbounds nuw %struct.FourBytes, ptr %a, i32 %i.0531900  %0 = load i8, ptr %arrayidx, align 11901  %conv = sitofp i8 %0 to float1902  %arrayidx1 = getelementptr inbounds nuw %struct.FourBytes, ptr %b, i32 %i.0531903  %1 = load i8, ptr %arrayidx1, align 11904  %conv3 = sitofp i8 %1 to float1905  %mul = fmul float %conv, %conv31906  %arrayidx4 = getelementptr inbounds nuw %struct.FourFloats, ptr %res, i32 %i.0531907  store float %mul, ptr %arrayidx4, align 41908  %y = getelementptr inbounds nuw i8, ptr %arrayidx, i32 11909  %2 = load i8, ptr %y, align 11910  %conv7 = sitofp i8 %2 to float1911  %y9 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 11912  %3 = load i8, ptr %y9, align 11913  %conv10 = sitofp i8 %3 to float1914  %mul11 = fmul float %conv7, %conv101915  %y13 = getelementptr inbounds nuw i8, ptr %arrayidx4, i32 41916  store float %mul11, ptr %y13, align 41917  %z = getelementptr inbounds nuw i8, ptr %arrayidx, i32 21918  %4 = load i8, ptr %z, align 11919  %conv15 = sitofp i8 %4 to float1920  %z17 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 21921  %5 = load i8, ptr %z17, align 11922  %conv18 = sitofp i8 %5 to float1923  %mul19 = fmul float %conv15, %conv181924  %z21 = getelementptr inbounds nuw i8, ptr %arrayidx4, i32 81925  store float %mul19, ptr %z21, align 41926  %w = getelementptr inbounds nuw i8, ptr %arrayidx, i32 31927  %6 = load i8, ptr %w, align 11928  %conv23 = sitofp i8 %6 to float1929  %w25 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 31930  %7 = load i8, ptr %w25, align 11931  %conv26 = sitofp i8 %7 to float1932  %mul27 = fmul float %conv23, %conv261933  %w29 = getelementptr inbounds nuw i8, ptr %arrayidx4, i32 121934  store float %mul27, ptr %w29, align 41935  %inc = add nuw i32 %i.053, 11936  %exitcond.not = icmp eq i32 %inc, %N1937  br i1 %exitcond.not, label %for.cond.cleanup, label %for.body1938}1939 1940; CHECK-LABEL: four_bytes_four_floats_vary_op1941; CHECK: Cost of 18 for VF 2: INTERLEAVE-GROUP with factor 41942; CHECK: Cost of 18 for VF 4: INTERLEAVE-GROUP with factor 41943; CHECK: Cost of 18 for VF 4: INTERLEAVE-GROUP with factor 41944; CHECK: Cost of 36 for VF 4: INTERLEAVE-GROUP with factor 41945; CHECK: LV: Scalar loop costs: 321946; CHECK: LV: Vector loop of width 2 costs: 511947; CHECK: LV: Vector loop of width 4 costs: 271948; CHECK: LV: Selecting VF: 41949define 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) {1950entry:1951  %cmp49.not = icmp eq i32 %N, 01952  br i1 %cmp49.not, label %for.cond.cleanup, label %for.body1953 1954for.cond.cleanup:                                 ; preds = %for.body, %entry1955  ret void1956 1957for.body:                                         ; preds = %entry, %for.body1958  %i.050 = phi i32 [ %inc, %for.body ], [ 0, %entry ]1959  %arrayidx = getelementptr inbounds nuw %struct.FourBytes, ptr %a, i32 %i.0501960  %0 = load i8, ptr %arrayidx, align 11961  %conv = sitofp i8 %0 to float1962  %arrayidx1 = getelementptr inbounds nuw %struct.FourBytes, ptr %b, i32 %i.0501963  %1 = load i8, ptr %arrayidx1, align 11964  %conv3 = sitofp i8 %1 to float1965  %mul = fmul float %conv, %conv31966  %arrayidx4 = getelementptr inbounds nuw %struct.FourFloats, ptr %res, i32 %i.0501967  store float %mul, ptr %arrayidx4, align 41968  %y = getelementptr inbounds nuw i8, ptr %arrayidx, i32 11969  %2 = load i8, ptr %y, align 11970  %conv7 = sitofp i8 %2 to float1971  %y9 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 11972  %3 = load i8, ptr %y9, align 11973  %conv10 = sitofp i8 %3 to float1974  %add = fadd float %conv7, %conv101975  %y12 = getelementptr inbounds nuw i8, ptr %arrayidx4, i32 41976  store float %add, ptr %y12, align 41977  %z = getelementptr inbounds nuw i8, ptr %arrayidx, i32 21978  %4 = load i8, ptr %z, align 11979  %conv14 = sitofp i8 %4 to float1980  %z16 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 21981  %5 = load i8, ptr %z16, align 11982  %conv17 = sitofp i8 %5 to float1983  %div = fdiv float %conv14, %conv171984  %z19 = getelementptr inbounds nuw i8, ptr %arrayidx4, i32 81985  store float %div, ptr %z19, align 41986  %w = getelementptr inbounds nuw i8, ptr %arrayidx, i32 31987  %6 = load i8, ptr %w, align 11988  %conv21 = sitofp i8 %6 to float1989  %w23 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 31990  %7 = load i8, ptr %w23, align 11991  %conv24 = sitofp i8 %7 to float1992  %sub = fsub float %conv21, %conv241993  %w26 = getelementptr inbounds nuw i8, ptr %arrayidx4, i32 121994  store float %sub, ptr %w26, align 41995  %inc = add nuw i32 %i.050, 11996  %exitcond.not = icmp eq i32 %inc, %N1997  br i1 %exitcond.not, label %for.cond.cleanup, label %for.body1998}1999 2000; CHECK-LABEL: four_floats_four_bytes_same_op2001; CHECK: Cost of 18 for VF 2: INTERLEAVE-GROUP with factor 42002; CHECK: Cost of 18 for VF 2: INTERLEAVE-GROUP with factor 42003; CHECK: Cost of 36 for VF 4: INTERLEAVE-GROUP with factor 42004; CHECK: Cost of 36 for VF 4: INTERLEAVE-GROUP with factor 42005; CHECK: Cost of 18 for VF 4: INTERLEAVE-GROUP with factor 42006; CHECK: LV: Scalar loop costs: 282007; CHECK: LV: Vector loop of width 2 costs: 482008; CHECK: LV: Vector loop of width 4 costs: 312009; CHECK: LV: Selecting VF: 12010define 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) {2011entry:2012  %cmp48.not = icmp eq i32 %N, 02013  br i1 %cmp48.not, label %for.cond.cleanup, label %for.body2014 2015for.cond.cleanup:                                 ; preds = %for.body, %entry2016  ret void2017 2018for.body:                                         ; preds = %entry, %for.body2019  %i.049 = phi i32 [ %inc, %for.body ], [ 0, %entry ]2020  %arrayidx = getelementptr inbounds nuw %struct.FourFloats, ptr %a, i32 %i.0492021  %0 = load float, ptr %arrayidx, align 42022  %arrayidx1 = getelementptr inbounds nuw %struct.FourFloats, ptr %b, i32 %i.0492023  %1 = load float, ptr %arrayidx1, align 42024  %mul = fmul float %0, %12025  %conv = fptosi float %mul to i82026  %arrayidx3 = getelementptr inbounds nuw %struct.FourBytes, ptr %res, i32 %i.0492027  store i8 %conv, ptr %arrayidx3, align 12028  %y = getelementptr inbounds nuw i8, ptr %arrayidx, i32 42029  %2 = load float, ptr %y, align 42030  %y7 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 42031  %3 = load float, ptr %y7, align 42032  %mul8 = fmul float %2, %32033  %conv9 = fptosi float %mul8 to i82034  %y11 = getelementptr inbounds nuw i8, ptr %arrayidx3, i32 12035  store i8 %conv9, ptr %y11, align 12036  %z = getelementptr inbounds nuw i8, ptr %arrayidx, i32 82037  %4 = load float, ptr %z, align 42038  %z14 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 82039  %5 = load float, ptr %z14, align 42040  %mul15 = fmul float %4, %52041  %conv16 = fptosi float %mul15 to i82042  %z18 = getelementptr inbounds nuw i8, ptr %arrayidx3, i32 22043  store i8 %conv16, ptr %z18, align 12044  %w = getelementptr inbounds nuw i8, ptr %arrayidx, i32 122045  %6 = load float, ptr %w, align 42046  %w21 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 122047  %7 = load float, ptr %w21, align 42048  %mul22 = fmul float %6, %72049  %conv23 = fptosi float %mul22 to i82050  %w25 = getelementptr inbounds nuw i8, ptr %arrayidx3, i32 32051  store i8 %conv23, ptr %w25, align 12052  %inc = add nuw i32 %i.049, 12053  %exitcond.not = icmp eq i32 %inc, %N2054  br i1 %exitcond.not, label %for.cond.cleanup, label %for.body2055}2056 2057; CHECK-LABEL: four_floats_four_bytes_vary_op2058; CHECK: Cost of 18 for VF 2: INTERLEAVE-GROUP with factor 42059; CHECK: Cost of 18 for VF 2: INTERLEAVE-GROUP with factor 42060; CHECK: Cost of 36 for VF 4: INTERLEAVE-GROUP with factor 42061; CHECK: Cost of 36 for VF 4: INTERLEAVE-GROUP with factor 42062; CHECK: Cost of 18 for VF 4: INTERLEAVE-GROUP with factor 42063; CHECK: LV: Scalar loop costs: 282064; CHECK: LV: Vector loop of width 2 costs: 482065; CHECK: LV: Vector loop of width 4 costs: 312066; CHECK: LV: Selecting VF: 12067define 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) {2068entry:2069  %cmp45.not = icmp eq i32 %N, 02070  br i1 %cmp45.not, label %for.cond.cleanup, label %for.body2071 2072for.cond.cleanup:                                 ; preds = %for.body, %entry2073  ret void2074 2075for.body:                                         ; preds = %entry, %for.body2076  %i.046 = phi i32 [ %inc, %for.body ], [ 0, %entry ]2077  %arrayidx = getelementptr inbounds nuw %struct.FourFloats, ptr %a, i32 %i.0462078  %0 = load float, ptr %arrayidx, align 42079  %arrayidx1 = getelementptr inbounds nuw %struct.FourFloats, ptr %b, i32 %i.0462080  %1 = load float, ptr %arrayidx1, align 42081  %mul = fmul float %0, %12082  %conv = fptosi float %mul to i82083  %arrayidx3 = getelementptr inbounds nuw %struct.FourBytes, ptr %res, i32 %i.0462084  store i8 %conv, ptr %arrayidx3, align 12085  %y = getelementptr inbounds nuw i8, ptr %arrayidx, i32 42086  %2 = load float, ptr %y, align 42087  %y7 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 42088  %3 = load float, ptr %y7, align 42089  %add = fadd float %2, %32090  %conv8 = fptosi float %add to i82091  %y10 = getelementptr inbounds nuw i8, ptr %arrayidx3, i32 12092  store i8 %conv8, ptr %y10, align 12093  %z = getelementptr inbounds nuw i8, ptr %arrayidx, i32 82094  %4 = load float, ptr %z, align 42095  %z13 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 82096  %5 = load float, ptr %z13, align 42097  %div = fdiv float %4, %52098  %conv14 = fptosi float %div to i82099  %z16 = getelementptr inbounds nuw i8, ptr %arrayidx3, i32 22100  store i8 %conv14, ptr %z16, align 12101  %w = getelementptr inbounds nuw i8, ptr %arrayidx, i32 122102  %6 = load float, ptr %w, align 42103  %w19 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 122104  %7 = load float, ptr %w19, align 42105  %sub = fsub float %6, %72106  %conv20 = fptosi float %sub to i82107  %w22 = getelementptr inbounds nuw i8, ptr %arrayidx3, i32 32108  store i8 %conv20, ptr %w22, align 12109  %inc = add nuw i32 %i.046, 12110  %exitcond.not = icmp eq i32 %inc, %N2111  br i1 %exitcond.not, label %for.cond.cleanup, label %for.body2112}2113 2114; CHECK-LABEL: four_shorts_four_floats_same_op2115; CHECK: Cost of 18 for VF 2: INTERLEAVE-GROUP with factor 42116; CHECK: Cost of 18 for VF 2: INTERLEAVE-GROUP with factor 42117; CHECK: Cost of 18 for VF 2: INTERLEAVE-GROUP with factor 42118; CHECK: Cost of 18 for VF 4: INTERLEAVE-GROUP with factor 42119; CHECK: Cost of 18 for VF 4: INTERLEAVE-GROUP with factor 42120; CHECK: Cost of 36 for VF 4: INTERLEAVE-GROUP with factor 42121; CHECK: LV: Scalar loop costs: 322122; CHECK: LV: Vector loop of width 2 costs: 412123; CHECK: LV: Vector loop of width 4 costs: 252124; CHECK: LV: Selecting VF: 42125define 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) {2126entry:2127  %cmp52.not = icmp eq i32 %N, 02128  br i1 %cmp52.not, label %for.cond.cleanup, label %for.body2129 2130for.cond.cleanup:                                 ; preds = %for.body, %entry2131  ret void2132 2133for.body:                                         ; preds = %entry, %for.body2134  %i.053 = phi i32 [ %inc, %for.body ], [ 0, %entry ]2135  %arrayidx = getelementptr inbounds nuw %struct.FourShorts, ptr %a, i32 %i.0532136  %0 = load i16, ptr %arrayidx, align 22137  %conv = sitofp i16 %0 to float2138  %arrayidx1 = getelementptr inbounds nuw %struct.FourShorts, ptr %b, i32 %i.0532139  %1 = load i16, ptr %arrayidx1, align 22140  %conv3 = sitofp i16 %1 to float2141  %mul = fmul float %conv, %conv32142  %arrayidx4 = getelementptr inbounds nuw %struct.FourFloats, ptr %res, i32 %i.0532143  store float %mul, ptr %arrayidx4, align 42144  %y = getelementptr inbounds nuw i8, ptr %arrayidx, i32 22145  %2 = load i16, ptr %y, align 22146  %conv7 = sitofp i16 %2 to float2147  %y9 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 22148  %3 = load i16, ptr %y9, align 22149  %conv10 = sitofp i16 %3 to float2150  %mul11 = fmul float %conv7, %conv102151  %y13 = getelementptr inbounds nuw i8, ptr %arrayidx4, i32 42152  store float %mul11, ptr %y13, align 42153  %z = getelementptr inbounds nuw i8, ptr %arrayidx, i32 42154  %4 = load i16, ptr %z, align 22155  %conv15 = sitofp i16 %4 to float2156  %z17 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 42157  %5 = load i16, ptr %z17, align 22158  %conv18 = sitofp i16 %5 to float2159  %mul19 = fmul float %conv15, %conv182160  %z21 = getelementptr inbounds nuw i8, ptr %arrayidx4, i32 82161  store float %mul19, ptr %z21, align 42162  %w = getelementptr inbounds nuw i8, ptr %arrayidx, i32 62163  %6 = load i16, ptr %w, align 22164  %conv23 = sitofp i16 %6 to float2165  %w25 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 62166  %7 = load i16, ptr %w25, align 22167  %conv26 = sitofp i16 %7 to float2168  %mul27 = fmul float %conv23, %conv262169  %w29 = getelementptr inbounds nuw i8, ptr %arrayidx4, i32 122170  store float %mul27, ptr %w29, align 42171  %inc = add nuw i32 %i.053, 12172  %exitcond.not = icmp eq i32 %inc, %N2173  br i1 %exitcond.not, label %for.cond.cleanup, label %for.body2174}2175 2176; CHECK-LABEL: four_shorts_four_floats_vary_op2177; CHECK: Cost of 18 for VF 2: INTERLEAVE-GROUP with factor 42178; CHECK: Cost of 18 for VF 2: INTERLEAVE-GROUP with factor 42179; CHECK: Cost of 18 for VF 2: INTERLEAVE-GROUP with factor 42180; CHECK: Cost of 18 for VF 4: INTERLEAVE-GROUP with factor 42181; CHECK: Cost of 18 for VF 4: INTERLEAVE-GROUP with factor 42182; CHECK: Cost of 36 for VF 4: INTERLEAVE-GROUP with factor 42183; CHECK: LV: Scalar loop costs: 322184; CHECK: LV: Vector loop of width 2 costs: 412185; CHECK: LV: Vector loop of width 4 costs: 252186; CHECK: LV: Selecting VF: 42187define 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) {2188entry:2189  %cmp49.not = icmp eq i32 %N, 02190  br i1 %cmp49.not, label %for.cond.cleanup, label %for.body2191 2192for.cond.cleanup:                                 ; preds = %for.body, %entry2193  ret void2194 2195for.body:                                         ; preds = %entry, %for.body2196  %i.050 = phi i32 [ %inc, %for.body ], [ 0, %entry ]2197  %arrayidx = getelementptr inbounds nuw %struct.FourShorts, ptr %a, i32 %i.0502198  %0 = load i16, ptr %arrayidx, align 22199  %conv = sitofp i16 %0 to float2200  %arrayidx1 = getelementptr inbounds nuw %struct.FourShorts, ptr %b, i32 %i.0502201  %1 = load i16, ptr %arrayidx1, align 22202  %conv3 = sitofp i16 %1 to float2203  %mul = fmul float %conv, %conv32204  %arrayidx4 = getelementptr inbounds nuw %struct.FourFloats, ptr %res, i32 %i.0502205  store float %mul, ptr %arrayidx4, align 42206  %y = getelementptr inbounds nuw i8, ptr %arrayidx, i32 22207  %2 = load i16, ptr %y, align 22208  %conv7 = sitofp i16 %2 to float2209  %y9 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 22210  %3 = load i16, ptr %y9, align 22211  %conv10 = sitofp i16 %3 to float2212  %add = fadd float %conv7, %conv102213  %y12 = getelementptr inbounds nuw i8, ptr %arrayidx4, i32 42214  store float %add, ptr %y12, align 42215  %z = getelementptr inbounds nuw i8, ptr %arrayidx, i32 42216  %4 = load i16, ptr %z, align 22217  %conv14 = sitofp i16 %4 to float2218  %z16 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 42219  %5 = load i16, ptr %z16, align 22220  %conv17 = sitofp i16 %5 to float2221  %div = fdiv float %conv14, %conv172222  %z19 = getelementptr inbounds nuw i8, ptr %arrayidx4, i32 82223  store float %div, ptr %z19, align 42224  %w = getelementptr inbounds nuw i8, ptr %arrayidx, i32 62225  %6 = load i16, ptr %w, align 22226  %conv21 = sitofp i16 %6 to float2227  %w23 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 62228  %7 = load i16, ptr %w23, align 22229  %conv24 = sitofp i16 %7 to float2230  %sub = fsub float %conv21, %conv242231  %w26 = getelementptr inbounds nuw i8, ptr %arrayidx4, i32 122232  store float %sub, ptr %w26, align 42233  %inc = add nuw i32 %i.050, 12234  %exitcond.not = icmp eq i32 %inc, %N2235  br i1 %exitcond.not, label %for.cond.cleanup, label %for.body2236}2237 2238; CHECK-LABEL: four_floats_four_shorts_same_op2239; CHECK: Cost of 18 for VF 2: INTERLEAVE-GROUP with factor 42240; CHECK: Cost of 18 for VF 2: INTERLEAVE-GROUP with factor 42241; CHECK: Cost of 18 for VF 2: INTERLEAVE-GROUP with factor 42242; CHECK: Cost of 36 for VF 4: INTERLEAVE-GROUP with factor 42243; CHECK: Cost of 36 for VF 4: INTERLEAVE-GROUP with factor 42244; CHECK: Cost of 18 for VF 4: INTERLEAVE-GROUP with factor 42245; CHECK: LV: Scalar loop costs: 282246; CHECK: LV: Vector loop of width 2 costs: 412247; CHECK: LV: Vector loop of width 4 costs: 292248; CHECK: LV: Selecting VF: 12249define 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) {2250entry:2251  %cmp48.not = icmp eq i32 %N, 02252  br i1 %cmp48.not, label %for.cond.cleanup, label %for.body2253 2254for.cond.cleanup:                                 ; preds = %for.body, %entry2255  ret void2256 2257for.body:                                         ; preds = %entry, %for.body2258  %i.049 = phi i32 [ %inc, %for.body ], [ 0, %entry ]2259  %arrayidx = getelementptr inbounds nuw %struct.FourFloats, ptr %a, i32 %i.0492260  %0 = load float, ptr %arrayidx, align 42261  %arrayidx1 = getelementptr inbounds nuw %struct.FourFloats, ptr %b, i32 %i.0492262  %1 = load float, ptr %arrayidx1, align 42263  %mul = fmul float %0, %12264  %conv = fptosi float %mul to i162265  %arrayidx3 = getelementptr inbounds nuw %struct.FourShorts, ptr %res, i32 %i.0492266  store i16 %conv, ptr %arrayidx3, align 22267  %y = getelementptr inbounds nuw i8, ptr %arrayidx, i32 42268  %2 = load float, ptr %y, align 42269  %y7 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 42270  %3 = load float, ptr %y7, align 42271  %mul8 = fmul float %2, %32272  %conv9 = fptosi float %mul8 to i162273  %y11 = getelementptr inbounds nuw i8, ptr %arrayidx3, i32 22274  store i16 %conv9, ptr %y11, align 22275  %z = getelementptr inbounds nuw i8, ptr %arrayidx, i32 82276  %4 = load float, ptr %z, align 42277  %z14 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 82278  %5 = load float, ptr %z14, align 42279  %mul15 = fmul float %4, %52280  %conv16 = fptosi float %mul15 to i162281  %z18 = getelementptr inbounds nuw i8, ptr %arrayidx3, i32 42282  store i16 %conv16, ptr %z18, align 22283  %w = getelementptr inbounds nuw i8, ptr %arrayidx, i32 122284  %6 = load float, ptr %w, align 42285  %w21 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 122286  %7 = load float, ptr %w21, align 42287  %mul22 = fmul float %6, %72288  %conv23 = fptosi float %mul22 to i162289  %w25 = getelementptr inbounds nuw i8, ptr %arrayidx3, i32 62290  store i16 %conv23, ptr %w25, align 22291  %inc = add nuw i32 %i.049, 12292  %exitcond.not = icmp eq i32 %inc, %N2293  br i1 %exitcond.not, label %for.cond.cleanup, label %for.body2294}2295 2296; CHECK-LABEL: four_floats_four_shorts_vary_op2297; CHECK: Cost of 18 for VF 2: INTERLEAVE-GROUP with factor 42298; CHECK: Cost of 18 for VF 2: INTERLEAVE-GROUP with factor 42299; CHECK: Cost of 18 for VF 2: INTERLEAVE-GROUP with factor 42300; CHECK: Cost of 36 for VF 4: INTERLEAVE-GROUP with factor 42301; CHECK: Cost of 36 for VF 4: INTERLEAVE-GROUP with factor 42302; CHECK: Cost of 18 for VF 4: INTERLEAVE-GROUP with factor 42303; CHECK: LV: Scalar loop costs: 282304; CHECK: LV: Vector loop of width 2 costs: 412305; CHECK: LV: Vector loop of width 4 costs: 292306; CHECK: LV: Selecting VF: 12307define 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) {2308entry:2309  %cmp45.not = icmp eq i32 %N, 02310  br i1 %cmp45.not, label %for.cond.cleanup, label %for.body2311 2312for.cond.cleanup:                                 ; preds = %for.body, %entry2313  ret void2314 2315for.body:                                         ; preds = %entry, %for.body2316  %i.046 = phi i32 [ %inc, %for.body ], [ 0, %entry ]2317  %arrayidx = getelementptr inbounds nuw %struct.FourFloats, ptr %a, i32 %i.0462318  %0 = load float, ptr %arrayidx, align 42319  %arrayidx1 = getelementptr inbounds nuw %struct.FourFloats, ptr %b, i32 %i.0462320  %1 = load float, ptr %arrayidx1, align 42321  %mul = fmul float %0, %12322  %conv = fptosi float %mul to i162323  %arrayidx3 = getelementptr inbounds nuw %struct.FourShorts, ptr %res, i32 %i.0462324  store i16 %conv, ptr %arrayidx3, align 22325  %y = getelementptr inbounds nuw i8, ptr %arrayidx, i32 42326  %2 = load float, ptr %y, align 42327  %y7 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 42328  %3 = load float, ptr %y7, align 42329  %add = fadd float %2, %32330  %conv8 = fptosi float %add to i162331  %y10 = getelementptr inbounds nuw i8, ptr %arrayidx3, i32 22332  store i16 %conv8, ptr %y10, align 22333  %z = getelementptr inbounds nuw i8, ptr %arrayidx, i32 82334  %4 = load float, ptr %z, align 42335  %z13 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 82336  %5 = load float, ptr %z13, align 42337  %div = fdiv float %4, %52338  %conv14 = fptosi float %div to i162339  %z16 = getelementptr inbounds nuw i8, ptr %arrayidx3, i32 42340  store i16 %conv14, ptr %z16, align 22341  %w = getelementptr inbounds nuw i8, ptr %arrayidx, i32 122342  %6 = load float, ptr %w, align 42343  %w19 = getelementptr inbounds nuw i8, ptr %arrayidx1, i32 122344  %7 = load float, ptr %w19, align 42345  %sub = fsub float %6, %72346  %conv20 = fptosi float %sub to i162347  %w22 = getelementptr inbounds nuw i8, ptr %arrayidx3, i32 62348  store i16 %conv20, ptr %w22, align 22349  %inc = add nuw i32 %i.046, 12350  %exitcond.not = icmp eq i32 %inc, %N2351  br i1 %exitcond.not, label %for.cond.cleanup, label %for.body2352}2353