brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.0 KiB · a475e5f Raw
76 lines · plain
1; RUN: opt -passes=loop-unroll,loop-simplify -S  < %s | FileCheck %s2 3; This test is one of the tests of PR33494. Its compilation takes4; excessive time if we don't mark visited nodes while looking for5; constants in SCEV expression trees.6 7target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"8target triple = "x86_64-unknown-linux-gnu"9 10define void @test_01(ptr nocapture %a) local_unnamed_addr {11 12; CHECK-LABEL: @test_01(13 14entry:15  %arrayidx = getelementptr inbounds i32, ptr %a, i64 9616  %arrayidx.promoted51 = load i32, ptr %arrayidx, align 117  br label %while.body18 19while.body:                                       ; preds = %entry, %while.end2920  %0 = phi i32 [ %arrayidx.promoted51, %entry ], [ %7, %while.end29 ]21  %cmp46 = icmp eq i32 %0, 122  %conv47 = zext i1 %cmp46 to i3223  %1 = add i32 %0, 124  %2 = icmp ult i32 %1, 325  %div48 = select i1 %2, i32 %0, i32 026  %cmp349 = icmp sgt i32 %div48, %conv4727  br i1 %cmp349, label %while.body4.lr.ph, label %while.end2928 29while.body4.lr.ph:                                ; preds = %while.body30  br label %while.body431 32while.body4:                                      ; preds = %while.body4.lr.ph, %while.end2833  %3 = phi i32 [ %0, %while.body4.lr.ph ], [ %mul17.lcssa, %while.end28 ]34  br label %while.body1335 36while.body13:                                     ; preds = %while.body4, %while.end.split37  %mul1745 = phi i32 [ %3, %while.body4 ], [ %mul17, %while.end.split ]38  %4 = phi i32 [ 15872, %while.body4 ], [ %add, %while.end.split ]39  %mul = mul nsw i32 %mul1745, %mul174540  %mul17 = mul nsw i32 %mul, %mul174541  %cmp22 = icmp eq i32 %4, %mul1742  br i1 %cmp22, label %while.body13.split, label %while.end.split43 44while.body13.split:                               ; preds = %while.body1345  br label %while.cond1946 47while.cond19:                                     ; preds = %while.cond19, %while.body13.split48  br label %while.cond1949 50while.end.split:                                  ; preds = %while.body1351  %add = shl nsw i32 %4, 152  %tobool12 = icmp eq i32 %add, 053  br i1 %tobool12, label %while.end28, label %while.body1354 55while.end28:                                      ; preds = %while.end.split56  %add.lcssa = phi i32 [ %add, %while.end.split ]57  %mul17.lcssa = phi i32 [ %mul17, %while.end.split ]58  %cmp = icmp eq i32 %mul17.lcssa, 159  %conv = zext i1 %cmp to i3260  %5 = add i32 %mul17.lcssa, 161  %6 = icmp ult i32 %5, 362  %div = select i1 %6, i32 %mul17.lcssa, i32 063  %cmp3 = icmp sgt i32 %div, %conv64  br i1 %cmp3, label %while.body4, label %while.cond1.while.end29_crit_edge65 66while.cond1.while.end29_crit_edge:                ; preds = %while.end2867  %.lcssa = phi i32 [ %mul17.lcssa, %while.end28 ]68  %add.lcssa50.lcssa = phi i32 [ %add.lcssa, %while.end28 ]69  store i32 %add.lcssa50.lcssa, ptr %a, align 470  br label %while.end2971 72while.end29:                                      ; preds = %while.cond1.while.end29_crit_edge, %while.body73  %7 = phi i32 [ %.lcssa, %while.cond1.while.end29_crit_edge ], [ %0, %while.body ]74  br label %while.body75}76