brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.2 KiB · 3b6f519 Raw
62 lines · plain
1; RUN: opt -passes='loop(loop-reduce)' %s -o - -S | FileCheck %s2 3; Required metadata to trigger previously failing assertion.4target datalayout = "e-m:e-i64:64-n32:64"5 6@f = external dso_local local_unnamed_addr global i32, align 47 8declare i32 @a() local_unnamed_addr9declare i32 @e(i32) local_unnamed_addr10 11define dso_local i32 @b() {12entry:13  %call = tail call i32 @a()14  %tobool.not = icmp eq i32 %call, 015  br i1 %tobool.not, label %cleanup.cont.critedge, label %if.then16 17if.then:                                          ; preds = %entry18; It's ok to modify this test in the future should be able to split critical19; edges here, just noting that this is the critical edge that we care about.20; CHECK: callbr void asm sideeffect "", "!i"()21; CHECK-NEXT: to label %return [label %cleanup.cont.critedge]22  callbr void asm sideeffect "", "!i"()23          to label %return [label %cleanup.cont.critedge]24 25cleanup.cont.critedge:                            ; preds = %entry, %if.then26  br label %return27 28return:                                           ; preds = %if.then, %cleanup.cont.critedge29  %retval.0 = phi i32 [ 4, %cleanup.cont.critedge ], [ 0, %if.then ]30  ret i32 %retval.031}32 33define dso_local i32 @do_pages_move_nr_pages() local_unnamed_addr {34entry:35  br label %for.cond36 37for.cond:                                         ; preds = %if.end3, %entry38  %g.0 = phi i32 [ undef, %entry ], [ %inc, %if.end3 ]39  %0 = load i32, ptr @f, align 440  %tobool.not = icmp eq i32 %0, 041  br i1 %tobool.not, label %if.end3, label %if.then42 43if.then:                                          ; preds = %for.cond44  %call.i = tail call i32 @a()45  %tobool.not.i = icmp eq i32 %call.i, 046  br i1 %tobool.not.i, label %if.then2, label %if.then.i47 48if.then.i:                                        ; preds = %if.then49  callbr void asm sideeffect "", "!i"()50          to label %if.end3 [label %if.then2]51 52if.then2:                                         ; preds = %if.then, %if.then.i53  %g.0.lcssa = phi i32 [ %g.0, %if.then ], [ %g.0, %if.then.i ]54  %call4 = tail call i32 @e(i32 %g.0.lcssa)55  ret i32 undef56 57if.end3:                                          ; preds = %for.cond, %if.then.i58  %inc = add nsw i32 %g.0, 159  br label %for.cond60}61 62