Skip to content

Commit

Permalink
[LV] Add exit users for recurrences in test, fix names.
Browse files Browse the repository at this point in the history
Add users of exit values for recurrences to make sure exit value
generation will be checked in a follow-up change.

Also adjusts/fixes naming in the test.
  • Loading branch information
fhahn committed Apr 13, 2023
1 parent d1dffa4 commit cdb48ee
Showing 1 changed file with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -649,27 +649,29 @@ exit:

; Make sure LLVM doesn't generate wrong data in SinkAfter, and causes crash in
; loop vectorizer.
define void @test_crash(ptr %p) {
define double @test_crash(ptr %p, ptr noalias %a, ptr noalias %b) {
; CHECK-LABEL: @test_crash
; CHECK-NOT: vector.body:
; CHECK: ret
Entry:
br label %Loop

Loop:
%for.1 = phi double [ %iv1, %Loop ], [ 0.000000e+00, %Entry ]
%for.2 = phi double [ %iv2, %Loop ], [ 0.000000e+00, %Entry ]
%for.1 = phi double [ %l1, %Loop ], [ 0.000000e+00, %Entry ]
%for.2 = phi double [ %l2, %Loop ], [ 0.000000e+00, %Entry ]
%for.3 = phi double [ %for.2, %Loop ], [ 0.000000e+00, %Entry ]
%for.4 = phi i64 [ %count, %Loop ], [ 0, %Entry ]
%iv = phi i64 [ %iv.next, %Loop ], [ 0, %Entry ]
%USE_2_INDVARS = fdiv double %for.3, %for.1
%div = fdiv double 0.000000e+00, %for.1
%iv1 = load double, ptr null, align 8
%count = add nuw nsw i64 %for.4, 1
%iv2 = load double, ptr null, align 8
%l1 = load double, ptr %a, align 8
%iv.next= add nuw nsw i64 %iv, 1
%l2 = load double, ptr %b, align 8
store double %div, ptr %p, align 8
%cond = icmp eq i64 %count, 0
%cond = icmp eq i64 %iv.next, 0
br i1 %cond, label %End, label %Loop

End:
ret void
%res.1 = fadd double %for.1, %for.2
%res.2 = fadd double %res.1, %for.3
ret double %res.2
}

0 comments on commit cdb48ee

Please sign in to comment.