136 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 42; RUN: opt -passes=slp-vectorizer -slp-vectorize-non-power-of-2 -mtriple=arm64-apple-ios -S %s | FileCheck --check-prefixes=NON-POW2 %s3; RUN: opt -passes=slp-vectorizer -slp-vectorize-non-power-of-2=false -mtriple=arm64-apple-ios -S %s | FileCheck --check-prefixes=POW2-ONLY %s4 5define void @v15_load_i8_mul_by_constant_store(ptr %src, ptr noalias %dst) {6; NON-POW2-LABEL: define void @v15_load_i8_mul_by_constant_store(7; NON-POW2-SAME: ptr [[SRC:%.*]], ptr noalias [[DST:%.*]]) {8; NON-POW2-NEXT: entry:9; NON-POW2-NEXT: [[GEP_SRC_0:%.*]] = getelementptr inbounds i8, ptr [[SRC]], i8 010; NON-POW2-NEXT: [[TMP0:%.*]] = load <15 x i8>, ptr [[GEP_SRC_0]], align 411; NON-POW2-NEXT: [[TMP1:%.*]] = mul nsw <15 x i8> [[TMP0]], splat (i8 10)12; NON-POW2-NEXT: store <15 x i8> [[TMP1]], ptr [[DST]], align 113; NON-POW2-NEXT: ret void14;15; POW2-ONLY-LABEL: define void @v15_load_i8_mul_by_constant_store(16; POW2-ONLY-SAME: ptr [[SRC:%.*]], ptr noalias [[DST:%.*]]) {17; POW2-ONLY-NEXT: entry:18; POW2-ONLY-NEXT: [[GEP_SRC_0:%.*]] = getelementptr inbounds i8, ptr [[SRC]], i8 019; POW2-ONLY-NEXT: [[TMP0:%.*]] = load <8 x i8>, ptr [[GEP_SRC_0]], align 420; POW2-ONLY-NEXT: [[TMP1:%.*]] = mul nsw <8 x i8> [[TMP0]], splat (i8 10)21; POW2-ONLY-NEXT: store <8 x i8> [[TMP1]], ptr [[DST]], align 122; POW2-ONLY-NEXT: [[GEP_SRC_8:%.*]] = getelementptr inbounds i8, ptr [[SRC]], i8 823; POW2-ONLY-NEXT: [[DST_8:%.*]] = getelementptr i8, ptr [[DST]], i8 824; POW2-ONLY-NEXT: [[TMP2:%.*]] = load <4 x i8>, ptr [[GEP_SRC_8]], align 425; POW2-ONLY-NEXT: [[TMP3:%.*]] = mul nsw <4 x i8> [[TMP2]], splat (i8 10)26; POW2-ONLY-NEXT: store <4 x i8> [[TMP3]], ptr [[DST_8]], align 127; POW2-ONLY-NEXT: [[GEP_SRC_12:%.*]] = getelementptr inbounds i8, ptr [[SRC]], i8 1228; POW2-ONLY-NEXT: [[L_SRC_12:%.*]] = load i8, ptr [[GEP_SRC_12]], align 429; POW2-ONLY-NEXT: [[MUL_12:%.*]] = mul nsw i8 [[L_SRC_12]], 1030; POW2-ONLY-NEXT: [[DST_12:%.*]] = getelementptr i8, ptr [[DST]], i8 1231; POW2-ONLY-NEXT: store i8 [[MUL_12]], ptr [[DST_12]], align 132; POW2-ONLY-NEXT: [[GEP_SRC_13:%.*]] = getelementptr inbounds i8, ptr [[SRC]], i8 1333; POW2-ONLY-NEXT: [[L_SRC_13:%.*]] = load i8, ptr [[GEP_SRC_13]], align 434; POW2-ONLY-NEXT: [[MUL_13:%.*]] = mul nsw i8 [[L_SRC_13]], 1035; POW2-ONLY-NEXT: [[DST_13:%.*]] = getelementptr i8, ptr [[DST]], i8 1336; POW2-ONLY-NEXT: store i8 [[MUL_13]], ptr [[DST_13]], align 137; POW2-ONLY-NEXT: [[GEP_SRC_14:%.*]] = getelementptr inbounds i8, ptr [[SRC]], i8 1438; POW2-ONLY-NEXT: [[L_SRC_14:%.*]] = load i8, ptr [[GEP_SRC_14]], align 439; POW2-ONLY-NEXT: [[MUL_14:%.*]] = mul nsw i8 [[L_SRC_14]], 1040; POW2-ONLY-NEXT: [[DST_14:%.*]] = getelementptr i8, ptr [[DST]], i8 1441; POW2-ONLY-NEXT: store i8 [[MUL_14]], ptr [[DST_14]], align 142; POW2-ONLY-NEXT: ret void43;44entry:45 %gep.src.0 = getelementptr inbounds i8, ptr %src, i8 046 %l.src.0 = load i8, ptr %gep.src.0, align 447 %mul.0 = mul nsw i8 %l.src.0, 1048 store i8 %mul.0, ptr %dst49 50 %gep.src.1 = getelementptr inbounds i8, ptr %src, i8 151 %l.src.1 = load i8, ptr %gep.src.1, align 452 %mul.1 = mul nsw i8 %l.src.1, 1053 %dst.1 = getelementptr i8, ptr %dst, i8 154 store i8 %mul.1, ptr %dst.155 56 %gep.src.2 = getelementptr inbounds i8, ptr %src, i8 257 %l.src.2 = load i8, ptr %gep.src.2, align 458 %mul.2 = mul nsw i8 %l.src.2, 1059 %dst.2 = getelementptr i8, ptr %dst, i8 260 store i8 %mul.2, ptr %dst.261 62 %gep.src.3 = getelementptr inbounds i8, ptr %src, i8 363 %l.src.3 = load i8, ptr %gep.src.3, align 464 %mul.3 = mul nsw i8 %l.src.3, 1065 %dst.3 = getelementptr i8, ptr %dst, i8 366 store i8 %mul.3, ptr %dst.367 68 %gep.src.4 = getelementptr inbounds i8, ptr %src, i8 469 %l.src.4 = load i8, ptr %gep.src.4, align 470 %mul.4 = mul nsw i8 %l.src.4, 1071 %dst.4 = getelementptr i8, ptr %dst, i8 472 store i8 %mul.4, ptr %dst.473 74 %gep.src.5 = getelementptr inbounds i8, ptr %src, i8 575 %l.src.5 = load i8, ptr %gep.src.5, align 476 %mul.5 = mul nsw i8 %l.src.5, 1077 %dst.5 = getelementptr i8, ptr %dst, i8 578 store i8 %mul.5, ptr %dst.579 80 %gep.src.6 = getelementptr inbounds i8, ptr %src, i8 681 %l.src.6 = load i8, ptr %gep.src.6, align 482 %mul.6 = mul nsw i8 %l.src.6, 1083 %dst.6 = getelementptr i8, ptr %dst, i8 684 store i8 %mul.6, ptr %dst.685 86 %gep.src.7 = getelementptr inbounds i8, ptr %src, i8 787 %l.src.7 = load i8, ptr %gep.src.7, align 488 %mul.7 = mul nsw i8 %l.src.7, 1089 %dst.7 = getelementptr i8, ptr %dst, i8 790 store i8 %mul.7, ptr %dst.791 92 %gep.src.8 = getelementptr inbounds i8, ptr %src, i8 893 %l.src.8 = load i8, ptr %gep.src.8, align 494 %mul.8 = mul nsw i8 %l.src.8, 1095 %dst.8 = getelementptr i8, ptr %dst, i8 896 store i8 %mul.8, ptr %dst.897 98 %gep.src.9 = getelementptr inbounds i8, ptr %src, i8 999 %l.src.9 = load i8, ptr %gep.src.9, align 4100 %mul.9 = mul nsw i8 %l.src.9, 10101 %dst.9 = getelementptr i8, ptr %dst, i8 9102 store i8 %mul.9, ptr %dst.9103 104 %gep.src.10 = getelementptr inbounds i8, ptr %src, i8 10105 %l.src.10 = load i8, ptr %gep.src.10, align 4106 %mul.10 = mul nsw i8 %l.src.10, 10107 %dst.10 = getelementptr i8, ptr %dst, i8 10108 store i8 %mul.10, ptr %dst.10109 110 %gep.src.11 = getelementptr inbounds i8, ptr %src, i8 11111 %l.src.11 = load i8, ptr %gep.src.11, align 4112 %mul.11 = mul nsw i8 %l.src.11, 10113 %dst.11 = getelementptr i8, ptr %dst, i8 11114 store i8 %mul.11, ptr %dst.11115 116 %gep.src.12 = getelementptr inbounds i8, ptr %src, i8 12117 %l.src.12 = load i8, ptr %gep.src.12, align 4118 %mul.12 = mul nsw i8 %l.src.12, 10119 %dst.12 = getelementptr i8, ptr %dst, i8 12120 store i8 %mul.12, ptr %dst.12121 122 %gep.src.13 = getelementptr inbounds i8, ptr %src, i8 13123 %l.src.13 = load i8, ptr %gep.src.13, align 4124 %mul.13 = mul nsw i8 %l.src.13, 10125 %dst.13 = getelementptr i8, ptr %dst, i8 13126 store i8 %mul.13, ptr %dst.13127 128 %gep.src.14 = getelementptr inbounds i8, ptr %src, i8 14129 %l.src.14 = load i8, ptr %gep.src.14, align 4130 %mul.14 = mul nsw i8 %l.src.14, 10131 %dst.14 = getelementptr i8, ptr %dst, i8 14132 store i8 %mul.14, ptr %dst.14133 134 ret void135}136