238 lines · plain
1; RUN: opt %loadNPMPolly '-passes=polly-custom<detect>' -polly-print-detect -disable-output < %s 2>&1 | FileCheck %s -check-prefix=DETECT2; RUN: opt %loadNPMPolly '-passes=polly-custom<scops>' -polly-print-detect -polly-print-scops -disable-output < %s 2>&1 | FileCheck %s3;4; DETECT: Valid Region for Scop: bb124 => bb1765;6; A valid Scop would print the list of it's statements, we check that we do not7; see that list.8;9; CHECK-NOT: Statements10 11target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"12target triple = "aarch64--linux-android"13 14%0 = type { ptr, i64, i64, i64, i64, i64, i64 }15 16define void @_Z1fR1SS0_Ph(ptr nocapture readonly dereferenceable(56) %arg, ptr nocapture readonly dereferenceable(56) %arg1, ptr nocapture readonly %arg2) {17bb:18 %tmp = getelementptr inbounds %0, ptr %arg1, i64 0, i32 119 %tmp4 = load ptr, ptr %arg, align 820 %tmp5 = getelementptr inbounds %0, ptr %arg, i64 0, i32 421 %tmp6 = load i64, ptr %tmp5, align 822 %tmp7 = getelementptr inbounds %0, ptr %arg, i64 0, i32 123 %tmp8 = load i64, ptr %tmp7, align 824 %tmp9 = mul i64 %tmp8, %tmp625 %tmp10 = getelementptr inbounds i8, ptr %tmp4, i64 %tmp926 %tmp11 = getelementptr inbounds %0, ptr %arg, i64 0, i32 327 %tmp12 = load i64, ptr %tmp11, align 828 %tmp13 = getelementptr inbounds i8, ptr %tmp10, i64 %tmp1229 %tmp14 = getelementptr inbounds %0, ptr %arg, i64 0, i32 630 %tmp15 = load i64, ptr %tmp14, align 831 %tmp16 = add i64 %tmp15, 132 %tmp17 = icmp eq i64 %tmp16, %tmp633 br i1 %tmp17, label %bb51, label %bb1834 35bb18: ; preds = %bb36 %tmp19 = getelementptr inbounds %0, ptr %arg, i64 0, i32 237 %tmp20 = load i64, ptr %tmp19, align 838 %tmp21 = mul i64 %tmp20, %tmp839 %tmp22 = getelementptr inbounds i8, ptr %tmp13, i64 %tmp2140 %tmp23 = getelementptr inbounds i8, ptr %tmp22, i64 %tmp941 %tmp24 = getelementptr inbounds i8, ptr %tmp23, i64 %tmp1242 %tmp26 = load ptr, ptr %arg1, align 843 %tmp27 = load i64, ptr %tmp, align 844 %tmp28 = getelementptr inbounds %0, ptr %arg1, i64 0, i32 445 %tmp29 = load i64, ptr %tmp28, align 846 %tmp30 = mul i64 %tmp27, %tmp2947 %tmp31 = getelementptr inbounds i16, ptr %tmp26, i64 %tmp3048 %tmp32 = getelementptr inbounds %0, ptr %arg1, i64 0, i32 349 %tmp33 = load i64, ptr %tmp32, align 850 %tmp34 = getelementptr inbounds i16, ptr %tmp31, i64 %tmp3351 %tmp35 = getelementptr inbounds %0, ptr %arg, i64 0, i32 552 %tmp36 = load i64, ptr %tmp35, align 853 br label %bb3754 55bb37: ; preds = %bb57, %bb1856 %tmp38 = phi i64 [ %tmp6, %bb18 ], [ %tmp58, %bb57 ]57 %tmp39 = phi i64 [ %tmp15, %bb18 ], [ %tmp59, %bb57 ]58 %tmp40 = phi i64 [ %tmp27, %bb18 ], [ %tmp60, %bb57 ]59 %tmp41 = phi i64 [ %tmp8, %bb18 ], [ %tmp61, %bb57 ]60 %tmp42 = phi i64 [ %tmp12, %bb18 ], [ %tmp62, %bb57 ]61 %tmp43 = phi i64 [ %tmp36, %bb18 ], [ %tmp63, %bb57 ]62 %tmp44 = phi ptr [ %tmp34, %bb18 ], [ %tmp69, %bb57 ]63 %tmp45 = phi ptr [ %tmp13, %bb18 ], [ %tmp64, %bb57 ]64 %tmp46 = phi ptr [ %tmp24, %bb18 ], [ %tmp68, %bb57 ]65 %tmp47 = phi i64 [ 0, %bb18 ], [ %tmp70, %bb57 ]66 %tmp48 = add i64 %tmp43, 167 %tmp49 = sub i64 %tmp48, %tmp4268 %tmp50 = icmp eq i64 %tmp49, 069 br i1 %tmp50, label %bb57, label %bb7470 71bb51: ; preds = %bb57, %bb72 ret void73 74bb52: ; preds = %bb17675 %tmp53 = load i64, ptr %tmp7, align 876 %tmp54 = load i64, ptr %tmp, align 877 %tmp55 = load i64, ptr %tmp14, align 878 %tmp56 = load i64, ptr %tmp5, align 879 br label %bb5780 81bb57: ; preds = %bb52, %bb3782 %tmp58 = phi i64 [ %tmp56, %bb52 ], [ %tmp38, %bb37 ]83 %tmp59 = phi i64 [ %tmp55, %bb52 ], [ %tmp39, %bb37 ]84 %tmp60 = phi i64 [ %tmp54, %bb52 ], [ %tmp40, %bb37 ]85 %tmp61 = phi i64 [ %tmp53, %bb52 ], [ %tmp41, %bb37 ]86 %tmp62 = phi i64 [ %tmp179, %bb52 ], [ %tmp42, %bb37 ]87 %tmp63 = phi i64 [ %tmp178, %bb52 ], [ %tmp43, %bb37 ]88 %tmp64 = getelementptr inbounds i8, ptr %tmp45, i64 %tmp6189 %tmp65 = and i64 %tmp47, 190 %tmp66 = icmp eq i64 %tmp65, 091 %tmp67 = getelementptr inbounds i8, ptr %tmp46, i64 %tmp6192 %tmp68 = select i1 %tmp66, ptr %tmp46, ptr %tmp6793 %tmp69 = getelementptr inbounds i16, ptr %tmp44, i64 %tmp6094 %tmp70 = add i64 %tmp47, 195 %tmp71 = add i64 %tmp59, 196 %tmp72 = sub i64 %tmp71, %tmp5897 %tmp73 = icmp ult i64 %tmp70, %tmp7298 br i1 %tmp73, label %bb37, label %bb5199 100bb74: ; preds = %bb176, %bb37101 %tmp75 = phi i64 [ %tmp181, %bb176 ], [ %tmp49, %bb37 ]102 %tmp76 = phi i64 [ %tmp177, %bb176 ], [ 0, %bb37 ]103 %tmp77 = getelementptr inbounds i8, ptr %tmp45, i64 %tmp76104 %tmp78 = load i8, ptr %tmp77, align 1105 %tmp79 = zext i8 %tmp78 to i32106 %tmp80 = or i64 %tmp76, 1107 %tmp81 = getelementptr inbounds i8, ptr %tmp45, i64 %tmp80108 %tmp82 = load i8, ptr %tmp81, align 1109 %tmp83 = zext i8 %tmp82 to i32110 %tmp84 = getelementptr inbounds i8, ptr %tmp46, i64 %tmp76111 %tmp85 = load i8, ptr %tmp84, align 1112 %tmp86 = zext i8 %tmp85 to i32113 %tmp87 = getelementptr inbounds i8, ptr %tmp46, i64 %tmp80114 %tmp88 = load i8, ptr %tmp87, align 1115 %tmp89 = zext i8 %tmp88 to i32116 %tmp90 = mul nuw nsw i32 %tmp86, 517117 %tmp91 = add nsw i32 %tmp90, -66176118 %tmp92 = sub nsw i32 128, %tmp86119 %tmp93 = mul nsw i32 %tmp92, 100120 %tmp94 = sub nsw i32 128, %tmp89121 %tmp95 = mul nsw i32 %tmp94, 208122 %tmp96 = mul nuw nsw i32 %tmp89, 409123 %tmp97 = add nsw i32 %tmp96, -52352124 %tmp98 = mul nuw nsw i32 %tmp79, 298125 %tmp99 = add nsw i32 %tmp98, -4768126 %tmp100 = add nsw i32 %tmp91, %tmp99127 %tmp101 = sdiv i32 %tmp100, 256128 %tmp102 = tail call { i32, i1 } @llvm.sadd.with.overflow.i32(i32 %tmp99, i32 %tmp95)129 %tmp103 = extractvalue { i32, i1 } %tmp102, 1130 br i1 %tmp103, label %bb104, label %bb105131 132bb104: ; preds = %bb120, %bb109, %bb105, %bb74133 tail call void @llvm.trap()134 unreachable135 136bb105: ; preds = %bb74137 %tmp106 = extractvalue { i32, i1 } %tmp102, 0138 %tmp107 = tail call { i32, i1 } @llvm.sadd.with.overflow.i32(i32 %tmp106, i32 %tmp93)139 %tmp108 = extractvalue { i32, i1 } %tmp107, 1140 br i1 %tmp108, label %bb104, label %bb109141 142bb109: ; preds = %bb105143 %tmp110 = extractvalue { i32, i1 } %tmp107, 0144 %tmp111 = sdiv i32 %tmp110, 256145 %tmp112 = add nsw i32 %tmp97, %tmp99146 %tmp113 = sdiv i32 %tmp112, 256147 %tmp114 = mul nuw nsw i32 %tmp83, 298148 %tmp115 = add nsw i32 %tmp114, -4768149 %tmp116 = add nsw i32 %tmp91, %tmp115150 %tmp117 = sdiv i32 %tmp116, 256151 %tmp118 = tail call { i32, i1 } @llvm.sadd.with.overflow.i32(i32 %tmp115, i32 %tmp95)152 %tmp119 = extractvalue { i32, i1 } %tmp118, 1153 br i1 %tmp119, label %bb104, label %bb120154 155bb120: ; preds = %bb109156 %tmp121 = extractvalue { i32, i1 } %tmp118, 0157 %tmp122 = tail call { i32, i1 } @llvm.sadd.with.overflow.i32(i32 %tmp121, i32 %tmp93)158 %tmp123 = extractvalue { i32, i1 } %tmp122, 1159 br i1 %tmp123, label %bb104, label %bb124160 161bb124: ; preds = %bb120162 %tmp125 = sext i32 %tmp101 to i64163 %tmp126 = getelementptr inbounds i8, ptr %arg2, i64 %tmp125164 %tmp127 = load i8, ptr %tmp126, align 1165 %tmp128 = zext i8 %tmp127 to i32166 %tmp129 = lshr i32 %tmp128, 3167 %tmp130 = shl nuw nsw i32 %tmp129, 11168 %tmp131 = sext i32 %tmp111 to i64169 %tmp132 = getelementptr inbounds i8, ptr %arg2, i64 %tmp131170 %tmp133 = load i8, ptr %tmp132, align 1171 %tmp134 = zext i8 %tmp133 to i32172 %tmp135 = lshr i32 %tmp134, 2173 %tmp136 = shl nuw nsw i32 %tmp135, 5174 %tmp137 = or i32 %tmp136, %tmp130175 %tmp138 = sext i32 %tmp113 to i64176 %tmp139 = getelementptr inbounds i8, ptr %arg2, i64 %tmp138177 %tmp140 = load i8, ptr %tmp139, align 1178 %tmp141 = zext i8 %tmp140 to i32179 %tmp142 = lshr i32 %tmp141, 3180 %tmp143 = or i32 %tmp137, %tmp142181 %tmp144 = icmp ult i64 %tmp80, %tmp75182 br i1 %tmp144, label %bb145, label %bb173183 184bb145: ; preds = %bb124185 %tmp146 = add nsw i32 %tmp97, %tmp115186 %tmp147 = sdiv i32 %tmp146, 256187 %tmp148 = sext i32 %tmp147 to i64188 %tmp149 = getelementptr inbounds i8, ptr %arg2, i64 %tmp148189 %tmp150 = load i8, ptr %tmp149, align 1190 %tmp151 = extractvalue { i32, i1 } %tmp122, 0191 %tmp152 = sdiv i32 %tmp151, 256192 %tmp153 = sext i32 %tmp152 to i64193 %tmp154 = getelementptr inbounds i8, ptr %arg2, i64 %tmp153194 %tmp155 = load i8, ptr %tmp154, align 1195 %tmp156 = sext i32 %tmp117 to i64196 %tmp157 = getelementptr inbounds i8, ptr %arg2, i64 %tmp156197 %tmp158 = load i8, ptr %tmp157, align 1198 %tmp159 = zext i8 %tmp158 to i32199 %tmp160 = lshr i32 %tmp159, 3200 %tmp161 = shl nuw nsw i32 %tmp160, 11201 %tmp162 = zext i8 %tmp155 to i32202 %tmp163 = lshr i32 %tmp162, 2203 %tmp164 = shl nuw nsw i32 %tmp163, 5204 %tmp165 = zext i8 %tmp150 to i32205 %tmp166 = lshr i32 %tmp165, 3206 %tmp167 = or i32 %tmp164, %tmp166207 %tmp168 = or i32 %tmp167, %tmp161208 %tmp169 = shl nuw i32 %tmp168, 16209 %tmp170 = or i32 %tmp169, %tmp143210 %tmp171 = getelementptr inbounds i16, ptr %tmp44, i64 %tmp76211 store i32 %tmp170, ptr %tmp171, align 4212 br label %bb176213 214bb173: ; preds = %bb124215 %tmp174 = trunc i32 %tmp143 to i16216 %tmp175 = getelementptr inbounds i16, ptr %tmp44, i64 %tmp76217 store i16 %tmp174, ptr %tmp175, align 2218 br label %bb176219 220bb176: ; preds = %bb173, %bb145221 %tmp177 = add i64 %tmp76, 2222 %tmp178 = load i64, ptr %tmp35, align 8223 %tmp179 = load i64, ptr %tmp11, align 8224 %tmp180 = add i64 %tmp178, 1225 %tmp181 = sub i64 %tmp180, %tmp179226 %tmp182 = icmp ult i64 %tmp177, %tmp181227 br i1 %tmp182, label %bb74, label %bb52228}229 230; Function Attrs: noreturn nounwind231declare void @llvm.trap() #0232 233; Function Attrs: nounwind readnone234declare { i32, i1 } @llvm.sadd.with.overflow.i32(i32, i32) #1235 236attributes #0 = { noreturn nounwind }237attributes #1 = { nounwind readnone }238