@@ -7,11 +7,10 @@ target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
7
7
8
8
; Check if the vector loop condition can be simplified to true for a given
9
9
; VF/IC combination.
10
- define i8 @test_early_exit_max_tc_less_than_16 (ptr %A , i64 %N ) nosync nofree {
10
+ define i8 @test_early_exit_max_tc_less_than_16 (ptr dereferenceable ( 16 ) %A ) nosync nofree {
11
11
; VF8UF1-LABEL: define i8 @test_early_exit_max_tc_less_than_16(
12
- ; VF8UF1-SAME: ptr [[A:%.*]], i64 [[N :%.*]]) #[[ATTR0:[0-9]+]] {
12
+ ; VF8UF1-SAME: ptr dereferenceable(16) [[A :%.*]]) #[[ATTR0:[0-9]+]] {
13
13
; VF8UF1-NEXT: [[ENTRY:.*]]:
14
- ; VF8UF1-NEXT: call void @llvm.assume(i1 true) [ "dereferenceable"(ptr [[A]], i64 32) ]
15
14
; VF8UF1-NEXT: br i1 false, label %[[SCALAR_PH:.*]], label %[[VECTOR_PH:.*]]
16
15
; VF8UF1: [[VECTOR_PH]]:
17
16
; VF8UF1-NEXT: br label %[[VECTOR_BODY:.*]]
@@ -51,9 +50,8 @@ define i8 @test_early_exit_max_tc_less_than_16(ptr %A, i64 %N) nosync nofree {
51
50
; VF8UF1-NEXT: ret i8 [[RES]]
52
51
;
53
52
; VF8UF2-LABEL: define i8 @test_early_exit_max_tc_less_than_16(
54
- ; VF8UF2-SAME: ptr [[A:%.*]], i64 [[N :%.*]]) #[[ATTR0:[0-9]+]] {
53
+ ; VF8UF2-SAME: ptr dereferenceable(16) [[A :%.*]]) #[[ATTR0:[0-9]+]] {
55
54
; VF8UF2-NEXT: [[ENTRY:.*]]:
56
- ; VF8UF2-NEXT: call void @llvm.assume(i1 true) [ "dereferenceable"(ptr [[A]], i64 32) ]
57
55
; VF8UF2-NEXT: br i1 false, label %[[SCALAR_PH:.*]], label %[[VECTOR_PH:.*]]
58
56
; VF8UF2: [[VECTOR_PH]]:
59
57
; VF8UF2-NEXT: br label %[[VECTOR_BODY:.*]]
@@ -93,9 +91,8 @@ define i8 @test_early_exit_max_tc_less_than_16(ptr %A, i64 %N) nosync nofree {
93
91
; VF8UF2-NEXT: ret i8 [[RES]]
94
92
;
95
93
; VF16UF1-LABEL: define i8 @test_early_exit_max_tc_less_than_16(
96
- ; VF16UF1-SAME: ptr [[A:%.*]], i64 [[N :%.*]]) #[[ATTR0:[0-9]+]] {
94
+ ; VF16UF1-SAME: ptr dereferenceable(16) [[A :%.*]]) #[[ATTR0:[0-9]+]] {
97
95
; VF16UF1-NEXT: [[ENTRY:.*]]:
98
- ; VF16UF1-NEXT: call void @llvm.assume(i1 true) [ "dereferenceable"(ptr [[A]], i64 32) ]
99
96
; VF16UF1-NEXT: br i1 false, label %[[SCALAR_PH:.*]], label %[[VECTOR_PH:.*]]
100
97
; VF16UF1: [[VECTOR_PH]]:
101
98
; VF16UF1-NEXT: br label %[[VECTOR_BODY:.*]]
@@ -135,7 +132,6 @@ define i8 @test_early_exit_max_tc_less_than_16(ptr %A, i64 %N) nosync nofree {
135
132
; VF16UF1-NEXT: ret i8 [[RES]]
136
133
;
137
134
entry:
138
- call void @llvm.assume (i1 true ) [ "dereferenceable" (ptr %A , i64 32 ) ]
139
135
br label %loop.header
140
136
141
137
loop.header:
@@ -155,11 +151,10 @@ exit:
155
151
ret i8 %res
156
152
}
157
153
158
- define i64 @test_early_exit_max_tc_less_than_16_with_iv_used_outside (ptr %A , i64 %N ) nosync nofree {
154
+ define i64 @test_early_exit_max_tc_less_than_16_with_iv_used_outside (ptr dereferenceable ( 16 ) %A ) nosync nofree {
159
155
; VF8UF1-LABEL: define i64 @test_early_exit_max_tc_less_than_16_with_iv_used_outside(
160
- ; VF8UF1-SAME: ptr [[A:%.*]], i64 [[N :%.*]]) #[[ATTR0]] {
156
+ ; VF8UF1-SAME: ptr dereferenceable(16) [[A :%.*]]) #[[ATTR0]] {
161
157
; VF8UF1-NEXT: [[ENTRY:.*]]:
162
- ; VF8UF1-NEXT: call void @llvm.assume(i1 true) [ "dereferenceable"(ptr [[A]], i64 32) ]
163
158
; VF8UF1-NEXT: br i1 false, label %[[SCALAR_PH:.*]], label %[[VECTOR_PH:.*]]
164
159
; VF8UF1: [[VECTOR_PH]]:
165
160
; VF8UF1-NEXT: br label %[[VECTOR_BODY:.*]]
@@ -203,9 +198,8 @@ define i64 @test_early_exit_max_tc_less_than_16_with_iv_used_outside(ptr %A, i64
203
198
; VF8UF1-NEXT: ret i64 [[RES]]
204
199
;
205
200
; VF8UF2-LABEL: define i64 @test_early_exit_max_tc_less_than_16_with_iv_used_outside(
206
- ; VF8UF2-SAME: ptr [[A:%.*]], i64 [[N :%.*]]) #[[ATTR0]] {
201
+ ; VF8UF2-SAME: ptr dereferenceable(16) [[A :%.*]]) #[[ATTR0]] {
207
202
; VF8UF2-NEXT: [[ENTRY:.*]]:
208
- ; VF8UF2-NEXT: call void @llvm.assume(i1 true) [ "dereferenceable"(ptr [[A]], i64 32) ]
209
203
; VF8UF2-NEXT: br i1 false, label %[[SCALAR_PH:.*]], label %[[VECTOR_PH:.*]]
210
204
; VF8UF2: [[VECTOR_PH]]:
211
205
; VF8UF2-NEXT: br label %[[VECTOR_BODY:.*]]
@@ -250,9 +244,8 @@ define i64 @test_early_exit_max_tc_less_than_16_with_iv_used_outside(ptr %A, i64
250
244
; VF8UF2-NEXT: ret i64 [[RES]]
251
245
;
252
246
; VF16UF1-LABEL: define i64 @test_early_exit_max_tc_less_than_16_with_iv_used_outside(
253
- ; VF16UF1-SAME: ptr [[A:%.*]], i64 [[N :%.*]]) #[[ATTR0]] {
247
+ ; VF16UF1-SAME: ptr dereferenceable(16) [[A :%.*]]) #[[ATTR0]] {
254
248
; VF16UF1-NEXT: [[ENTRY:.*]]:
255
- ; VF16UF1-NEXT: call void @llvm.assume(i1 true) [ "dereferenceable"(ptr [[A]], i64 32) ]
256
249
; VF16UF1-NEXT: br i1 false, label %[[SCALAR_PH:.*]], label %[[VECTOR_PH:.*]]
257
250
; VF16UF1: [[VECTOR_PH]]:
258
251
; VF16UF1-NEXT: br label %[[VECTOR_BODY:.*]]
@@ -296,7 +289,6 @@ define i64 @test_early_exit_max_tc_less_than_16_with_iv_used_outside(ptr %A, i64
296
289
; VF16UF1-NEXT: ret i64 [[RES]]
297
290
;
298
291
entry:
299
- call void @llvm.assume (i1 true ) [ "dereferenceable" (ptr %A , i64 32 ) ]
300
292
br label %loop.header
301
293
302
294
loop.header:
0 commit comments