[llvm] cdb48ee - [LV] Add exit users for recurrences in test, fix names.
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 13 12:25:02 PDT 2023
Author: Florian Hahn
Date: 2023-04-13T20:23:56+01:00
New Revision: cdb48eefd07b5f2dcc381ab62a4ad796c2012476
URL: https://github.com/llvm/llvm-project/commit/cdb48eefd07b5f2dcc381ab62a4ad796c2012476
DIFF: https://github.com/llvm/llvm-project/commit/cdb48eefd07b5f2dcc381ab62a4ad796c2012476.diff
LOG: [LV] Add exit users for recurrences in test, fix names.
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.
Added:
Modified:
llvm/test/Transforms/LoopVectorize/first-order-recurrence-chains.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/LoopVectorize/first-order-recurrence-chains.ll b/llvm/test/Transforms/LoopVectorize/first-order-recurrence-chains.ll
index dc7fc9dfe0dc..5e235077ac74 100644
--- a/llvm/test/Transforms/LoopVectorize/first-order-recurrence-chains.ll
+++ b/llvm/test/Transforms/LoopVectorize/first-order-recurrence-chains.ll
@@ -649,7 +649,7 @@ 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
@@ -657,19 +657,21 @@ 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
}
More information about the llvm-commits
mailing list