[LV] Move unrelated tests from first-order-recurrence-chains.ll

This commit is contained in:
Florian Hahn 2022-02-11 09:15:41 +00:00
parent 0b41238ae7
commit 9474c3009e
No known key found for this signature in database
GPG Key ID: EEF712BB5E80EBBA
2 changed files with 51 additions and 48 deletions

View File

@ -135,7 +135,6 @@ exit:
ret void
}
define void @test_chained_first_order_recurrence_sink_users_1(double* %ptr) {
; CHECK-LABEL: @test_chained_first_order_recurrence_sink_users_1
; CHECK-NOT: vector.body:
@ -150,53 +149,9 @@ loop:
%add.1 = fadd double 10.0, %for.2
%add.2 = fadd double %add.1, %for.1
%iv.next = add nuw nsw i64 %iv, 1
%for.1.next = load double, double* undef, align 8
%exitcond.not = icmp eq i64 %iv.next, 1000
br i1 %exitcond.not, label %exit, label %loop
exit:
ret void
}
define void @test_chained_first_order_recurrence_sink_users_2(double* %ptr) {
; CHECK-LABEL: @test_chained_first_order_recurrence_sink_users_2
; CHECK-NOT: vector.body:
;
entry:
br label %loop
loop:
%for.1 = phi double [ 10.0, %entry ], [ %for.1.next, %loop ]
%for.2 = phi double [ 20.0, %entry ], [ %for.1.next, %loop ]
%iv = phi i64 [ 1, %entry ], [ %iv.next, %loop ]
%add.1 = fadd double 10.0, %for.2
%add.2 = fadd double %add.1, %for.1
%iv.next = add nuw nsw i64 %iv, 1
%for.1.next = load double, double* undef, align 8
%exitcond.not = icmp eq i64 %iv.next, 1000
br i1 %exitcond.not, label %exit, label %loop
exit:
ret void
}
define void @test_chained_first_order_recurrence_sink_users_3(double* %ptr) {
; CHECK-LABEL: @test_chained_first_order_recurrence_sink_users_3
; CHECK-NOT: vector.body:
;
entry:
br label %loop
loop:
%for.1 = phi double [ 10.0, %entry ], [ %for.1.next, %loop ]
%for.2 = phi double [ 20.0, %entry ], [ %for.1.next, %loop ]
%iv = phi i64 [ 1, %entry ], [ %iv.next, %loop ]
%add.1 = fadd double 10.0, %for.2
%add.2 = fadd double %add.1, %for.1
%iv.next = add nuw nsw i64 %iv, 1
%for.1.next = load double, double* undef, align 8
%gep.ptr = getelementptr inbounds double, double* %ptr, i64 %iv
%for.1.next = load double, double* %gep.ptr, align 8
store double %add.2, double* %gep.ptr
%exitcond.not = icmp eq i64 %iv.next, 1000
br i1 %exitcond.not, label %exit, label %loop

View File

@ -899,3 +899,51 @@ loop:
exit:
ret void
}
define void @test_for_sink_instruction_after_same_incoming_1(double* %ptr) {
; CHECK-LABEL: @test_for_sink_instruction_after_same_incoming_1
; CHECK-NOT: vector.body:
;
entry:
br label %loop
loop:
%for.1 = phi double [ 10.0, %entry ], [ %for.1.next, %loop ]
%for.2 = phi double [ 20.0, %entry ], [ %for.1.next, %loop ]
%iv = phi i64 [ 1, %entry ], [ %iv.next, %loop ]
%add.1 = fadd double 10.0, %for.2
%add.2 = fadd double %add.1, %for.1
%iv.next = add nuw nsw i64 %iv, 1
%gep.ptr = getelementptr inbounds double, double* %ptr, i64 %iv
%for.1.next = load double, double* %gep.ptr, align 8
store double %add.2, double* %gep.ptr
%exitcond.not = icmp eq i64 %iv.next, 1000
br i1 %exitcond.not, label %exit, label %loop
exit:
ret void
}
define void @test_for_sink_instruction_after_same_incoming_2(double* %ptr) {
; CHECK-LABEL: @test_for_sink_instruction_after_same_incoming_2
; CHECK-NOT: vector.body:
entry:
br label %loop
loop:
%for.2 = phi double [ 20.0, %entry ], [ %for.1.next, %loop ]
%for.1 = phi double [ 10.0, %entry ], [ %for.1.next, %loop ]
%iv = phi i64 [ 1, %entry ], [ %iv.next, %loop ]
%add.1 = fadd double 10.0, %for.2
%add.2 = fadd double %add.1, %for.1
%iv.next = add nuw nsw i64 %iv, 1
%gep.ptr = getelementptr inbounds double, double* %ptr, i64 %iv
%for.1.next = load double, double* %gep.ptr, align 8
store double %add.2, double* %gep.ptr
%exitcond.not = icmp eq i64 %iv.next, 1000
br i1 %exitcond.not, label %exit, label %loop
exit:
ret void
}