1; RUN: opt < %s -loop-extract -S | FileCheck %s 2 3@choum.addr = internal unnamed_addr constant [3 x i8*] [i8* blockaddress(@choum, %12), i8* blockaddress(@choum, %16), i8* blockaddress(@choum, %20)] 4 5; CHECK: define 6; no outlined function 7; CHECK-NOT: define 8 9define void @choum(i32, i32* nocapture, i32) { 10 %4 = icmp sgt i32 %0, 0 11 br i1 %4, label %5, label %26 12 13 %6 = sext i32 %2 to i64 14 %7 = getelementptr inbounds [3 x i8*], [3 x i8*]* @choum.addr, i64 0, i64 %6 15 %8 = load i8*, i8** %7 16 %9 = zext i32 %0 to i64 17 br label %10 18 19 %11 = phi i64 [ 0, %5 ], [ %24, %20 ] 20 indirectbr i8* %8, [label %12, label %16, label %20] 21 22 %13 = getelementptr inbounds i32, i32* %1, i64 %11 23 %14 = load i32, i32* %13 24 %15 = add nsw i32 %14, 1 25 store i32 %15, i32* %13 26 br label %16 27 28 %17 = getelementptr inbounds i32, i32* %1, i64 %11 29 %18 = load i32, i32* %17 30 %19 = shl nsw i32 %18, 1 31 store i32 %19, i32* %17 32 br label %20 33 34 %21 = getelementptr inbounds i32, i32* %1, i64 %11 35 %22 = load i32, i32* %21 36 %23 = add nsw i32 %22, -3 37 store i32 %23, i32* %21 38 %24 = add nuw nsw i64 %11, 1 39 %25 = icmp eq i64 %24, %9 40 br i1 %25, label %26, label %10 41 42 ret void 43} 44