brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.5 KiB · 65fe5d5 Raw
68 lines · plain
1; RUN: opt -S -passes=indvars < %s | FileCheck %s2 3; CHECK: @main4; CHECK: %mul.lcssa5 = phi i32 [ %a.promoted4, %entry ], [ %mul.30, %for.body3 ]5; CHECK: %mul = mul nsw i32 %mul.lcssa5, %mul.lcssa56; CHECK: %mul.30 = mul nsw i32 %mul.29, %mul.297 8target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"9target triple = "x86_64-unknown-linux-gnu"10 11@a = local_unnamed_addr global i32 0, align 412@b = local_unnamed_addr global i32 0, align 413 14; Function Attrs: norecurse nounwind uwtable15define i32 @main() local_unnamed_addr {16entry:17  %a.promoted4 = load i32, ptr @a, align 418  br label %for.cond1.preheader19 20for.cond1.preheader:                              ; preds = %entry, %for.body321  %mul.lcssa5 = phi i32 [ %a.promoted4, %entry ], [ %mul.30, %for.body3 ]22  %i.03 = phi i32 [ 0, %entry ], [ %inc5, %for.body3 ]23  br label %for.body324 25for.body3:                                        ; preds = %for.cond1.preheader26  %mul = mul nsw i32 %mul.lcssa5, %mul.lcssa527  %mul.1 = mul nsw i32 %mul, %mul28  %mul.2 = mul nsw i32 %mul.1, %mul.129  %mul.3 = mul nsw i32 %mul.2, %mul.230  %mul.4 = mul nsw i32 %mul.3, %mul.331  %mul.5 = mul nsw i32 %mul.4, %mul.432  %mul.6 = mul nsw i32 %mul.5, %mul.533  %mul.7 = mul nsw i32 %mul.6, %mul.634  %mul.8 = mul nsw i32 %mul.7, %mul.735  %mul.9 = mul nsw i32 %mul.8, %mul.836  %mul.10 = mul nsw i32 %mul.9, %mul.937  %mul.11 = mul nsw i32 %mul.10, %mul.1038  %mul.12 = mul nsw i32 %mul.11, %mul.1139  %mul.13 = mul nsw i32 %mul.12, %mul.1240  %mul.14 = mul nsw i32 %mul.13, %mul.1341  %mul.15 = mul nsw i32 %mul.14, %mul.1442  %mul.16 = mul nsw i32 %mul.15, %mul.1543  %mul.17 = mul nsw i32 %mul.16, %mul.1644  %mul.18 = mul nsw i32 %mul.17, %mul.1745  %mul.19 = mul nsw i32 %mul.18, %mul.1846  %mul.20 = mul nsw i32 %mul.19, %mul.1947  %mul.21 = mul nsw i32 %mul.20, %mul.2048  %mul.22 = mul nsw i32 %mul.21, %mul.2149  %mul.23 = mul nsw i32 %mul.22, %mul.2250  %mul.24 = mul nsw i32 %mul.23, %mul.2351  %mul.25 = mul nsw i32 %mul.24, %mul.2452  %mul.26 = mul nsw i32 %mul.25, %mul.2553  %mul.27 = mul nsw i32 %mul.26, %mul.2654  %mul.28 = mul nsw i32 %mul.27, %mul.2755  %mul.29 = mul nsw i32 %mul.28, %mul.2856  %mul.30 = mul nsw i32 %mul.29, %mul.2957  %inc5 = add nuw nsw i32 %i.03, 158  %exitcond = icmp ne i32 %inc5, 1059  br i1 %exitcond, label %for.cond1.preheader, label %for.end660 61for.end6:                                         ; preds = %for.body362  %mul.lcssa.lcssa = phi i32 [ %mul.30, %for.body3 ]63  %inc.lcssa.lcssa = phi i32 [ 31, %for.body3 ]64  store i32 %mul.lcssa.lcssa, ptr @a, align 465  store i32 %inc.lcssa.lcssa, ptr @b, align 466  ret i32 067}68