47 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 42; RUN: opt -S -passes=loop-rotate < %s | FileCheck %s3 4declare void @bar()5 6@threadlocalint = thread_local global i32 0, align 47 8define void @foo() #0 {9; CHECK-LABEL: define void @foo(10; CHECK-SAME: ) #[[ATTR0:[0-9]+]] {11; CHECK-NEXT: entry:12; CHECK-NEXT: [[TMP0:%.*]] = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @threadlocalint)13; CHECK-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 414; CHECK-NEXT: [[CMP1:%.*]] = icmp eq i32 [[TMP1]], 015; CHECK-NEXT: br i1 [[CMP1]], label [[COND_END_LR_PH:%.*]], label [[COND_FALSE:%.*]]16; CHECK: cond.end.lr.ph:17; CHECK-NEXT: br label [[COND_END:%.*]]18; CHECK: while.cond.cond.false_crit_edge:19; CHECK-NEXT: br label [[COND_FALSE]]20; CHECK: cond.false:21; CHECK-NEXT: ret void22; CHECK: cond.end:23; CHECK-NEXT: call void @bar()24; CHECK-NEXT: [[TMP2:%.*]] = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @threadlocalint)25; CHECK-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 426; CHECK-NEXT: [[CMP:%.*]] = icmp eq i32 [[TMP3]], 027; CHECK-NEXT: br i1 [[CMP]], label [[COND_END]], label [[WHILE_COND_COND_FALSE_CRIT_EDGE:%.*]]28;29entry:30 br label %while.cond31 32while.cond:33 %1 = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @threadlocalint)34 %2 = load i32, ptr %1, align 435 %cmp = icmp eq i32 %2, 036 br i1 %cmp, label %cond.end, label %cond.false37 38cond.false:39 ret void40 41cond.end:42 call void @bar()43 br label %while.cond44}45 46attributes #0 = { presplitcoroutine }47