Skip to content

Commit c32207d

Browse files
committed
keep existing postinc test
1 parent 3355ccc commit c32207d

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

llvm/test/CodeGen/AVR/load.ll

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,32 @@ while.end: ; preds = %while.body, %entry
7676
ret i8 %r.0.lcssa
7777
}
7878

79-
define i16 @load16postinc(ptr %p, i16 %cnt) {
79+
define i16 @load16postinc(ptr %x, i16 %y) {
8080
; CHECK-LABEL: load16postinc:
8181
; CHECK: ld {{.*}}, {{[XYZ]}}+
8282
; CHECK: ld {{.*}}, {{[XYZ]}}+
83+
entry:
84+
%tobool2 = icmp eq i16 %y, 0
85+
br i1 %tobool2, label %while.end, label %while.body
86+
while.body: ; preds = %entry, %while.body
87+
%r.05 = phi i16 [ %add, %while.body ], [ 0, %entry ]
88+
%y.addr.04 = phi i16 [ %dec, %while.body ], [ %y, %entry ]
89+
%x.addr.03 = phi ptr [ %incdec.ptr, %while.body ], [ %x, %entry ]
90+
%dec = add nsw i16 %y.addr.04, -1
91+
%incdec.ptr = getelementptr inbounds i16, ptr %x.addr.03, i16 1
92+
%0 = load i16, ptr %x.addr.03
93+
%add = add nsw i16 %0, %r.05
94+
%tobool = icmp eq i16 %dec, 0
95+
br i1 %tobool, label %while.end, label %while.body
96+
while.end: ; preds = %while.body, %entry
97+
%r.0.lcssa = phi i16 [ 0, %entry ], [ %add, %while.body ]
98+
ret i16 %r.0.lcssa
99+
}
100+
101+
define i16 @load16postincloopreduce(ptr %p, i16 %cnt) {
102+
; CHECK-LABEL: load16postincloopreduce:
103+
; CHECK: ld {{.*}}, {{[XYZ]}}+
104+
; CHECK: ld {{.*}}, {{[XYZ]}}+
83105
entry:
84106
%cmp3 = icmp sgt i16 %cnt, 0
85107
br i1 %cmp3, label %for.body, label %for.cond.cleanup

0 commit comments

Comments
 (0)