1- ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
21; RUN: opt -S < %s -passes='loop-vectorize,verify<loops>,print<loops>' -disable-output 2>&1 | FileCheck %s
32
43declare void @init_mem (ptr , i64 );
54
65; Tests that the additional middle.split created for handling loops with
76; uncountable early exits is correctly adding to the outer loop at depth 1.
87define void @early_exit_in_outer_loop1 () {
8+ ; CHECK-LABEL: Loop info for function 'early_exit_in_outer_loop1':
9+ ; CHECK: Loop at depth 1 containing: %loop.outer<header>,%loop.inner.found,%loop.inner.end<latch>,%loop.inner.end.loopexit,%vector.ph,%vector.body,%middle.split,%middle.block,%vector.early.exit
910entry:
1011 %p1 = alloca [1024 x i8 ]
1112 %p2 = alloca [1024 x i8 ]
@@ -43,6 +44,9 @@ loop.inner.end:
4344; uncountable early exits is correctly adding to both the outer and middle
4445; loops at depths 1 and 2, respectively.
4546define void @early_exit_in_outer_loop2 () {
47+ ; CHECK-LABEL: Loop info for function 'early_exit_in_outer_loop2':
48+ ; CHECK: Loop at depth 1 containing: %loop.outer<header>,%loop.middle,%loop.inner.found,%loop.inner.end,%loop.middle.end,%loop.outer.latch<latch>,%vector.ph,%vector.body,%middle.split,%middle.block,%vector.early.exit
49+ ; CHECK: Loop at depth 2 containing: %loop.middle<header>,%loop.inner.end<latch><exiting>,%vector.ph,%vector.body,%middle.split<exiting>,%middle.block
4650entry:
4751 %p1 = alloca [1024 x i8 ]
4852 %p2 = alloca [1024 x i8 ]
@@ -87,6 +91,9 @@ loop.outer.latch:
8791}
8892
8993define i32 @early_exit_branch_to_outer_header () {
94+ ; CHECK-LABEL: Loop info for function 'early_exit_branch_to_outer_header':
95+ ; CHECK-NEXT: Loop at depth 1 containing: %outer.header<header>,%outer.header.loopexit<latch>,%vector.ph,%vector.body,%middle.split<exiting>,%vector.early.exit
96+ ; CHECK-NEXT: Loop at depth 2 containing: %vector.body<header><latch><exiting>
9097entry:
9198 %src = alloca [1024 x i8 ]
9299 call void @init_mem (ptr %src , i64 1024 )
@@ -110,5 +117,3 @@ loop.latch:
110117exit:
111118 ret i32 1
112119}
113- ;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:
114- ; CHECK: {{.*}}
0 commit comments