1 ; RUN: opt -hexagon-loop-idiom -S -mtriple hexagon-unknown-elf < %s \
4 define void @PR14241(ptr %s, i64 %size) #0 {
5 ; Ensure that we don't form a memcpy for strided loops. Briefly, when we taught
6 ; LoopIdiom about memmove and strided loops, this got miscompiled into a memcpy
7 ; instead of a memmove. If we get the memmove transform back, this will catch
10 ; CHECK-LABEL: @PR14241(
13 %end.idx = add i64 %size, -1
14 %end.ptr = getelementptr inbounds i32, ptr %s, i64 %end.idx
20 %phi.ptr = phi ptr [ %s, %entry ], [ %next.ptr, %while.body ]
21 %src.ptr = getelementptr inbounds i32, ptr %phi.ptr, i64 1
22 %val = load i32, ptr %src.ptr, align 4
24 store i32 %val, ptr %phi.ptr, align 4
26 %next.ptr = getelementptr inbounds i32, ptr %phi.ptr, i64 1
27 %cmp = icmp eq ptr %next.ptr, %end.ptr
28 br i1 %cmp, label %exit, label %while.body
35 attributes #0 = { nounwind }