Skip to content

Commit b6a8861

Browse files
committed
[LV] Add test for failing reduction remark case
Issue #165359. https://godbolt.org/z/z1P6Wxj7d
1 parent bd0efca commit b6a8861

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
; RUN: opt < %s -passes=loop-vectorize -S -pass-remarks=loop-vectorize
2+
3+
target triple = "aarch64-unknown-linux-gnu"
4+
5+
define void @reduce_fail(i64 %loop_count, ptr %ptr0, ptr noalias %ptr1) #0 {
6+
entry:
7+
%d1 = load double, ptr %ptr1
8+
%d0 = load double, ptr %ptr0
9+
br label %loop
10+
11+
loop:
12+
%acc0 = phi double [ %fadd0, %loop ], [ %d0, %entry ]
13+
%counter = phi i64 [ %counter_updated, %loop ], [ %loop_count, %entry ]
14+
%fadd0 = fadd double %acc0, %d1
15+
%counter_updated = add nsw i64 %counter, -1
16+
%exit_cond = icmp samesign ugt i64 %counter, 1
17+
br i1 %exit_cond, label %loop, label %loopexit
18+
19+
loopexit:
20+
store double %fadd0, ptr %ptr1
21+
ret void
22+
}
23+
24+
attributes #0 = { "target-features"="+sve" }

0 commit comments

Comments
 (0)