-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[AArch64] Set MaxInterleaving to 4 for Neoverse V2 and V3 #100385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
118 changes: 118 additions & 0 deletions
118
llvm/test/Transforms/LoopVectorize/AArch64/neoverse-epilogue-vect.ll
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
; RUN: opt -passes=loop-vectorize -S < %s | FileCheck %s | ||
|
||
target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32" | ||
target triple = "aarch64-unknown-linux-gnu" | ||
|
||
define noundef i32 @V1(ptr noalias nocapture noundef %0, ptr noalias nocapture noundef readonly %1, i32 noundef %2) #0 { | ||
; CHECK-LABEL: @V1( | ||
; CHECK-NOT: vec.epilog.ph: | ||
; CHECK-NOT: vec.epilog.vector.body: | ||
; CHECK-NOT: vec.epilog.middle.block: | ||
; CHECK-NOT: vec.epilog.scalar.ph: | ||
; | ||
entry: | ||
%4 = icmp sgt i32 %2, 0 | ||
br i1 %4, label %5, label %8 | ||
|
||
5: | ||
%6 = zext nneg i32 %2 to i64 | ||
br label %9 | ||
|
||
7: | ||
br label %8 | ||
|
||
8: | ||
ret i32 42 | ||
|
||
9: | ||
%10 = phi i64 [ 0, %5 ], [ %16, %9 ] | ||
%11 = getelementptr inbounds double, ptr %0, i64 %10 | ||
%12 = load double, ptr %11, align 8 | ||
%13 = getelementptr inbounds double, ptr %1, i64 %10 | ||
%14 = load double, ptr %13, align 8 | ||
%15 = fadd fast double %14, %12 | ||
store double %15, ptr %11, align 8 | ||
%16 = add nuw nsw i64 %10, 1 | ||
%17 = icmp eq i64 %16, %6 | ||
br i1 %17, label %7, label %9 | ||
} | ||
|
||
define noundef i32 @V2(ptr noalias nocapture noundef %0, ptr noalias nocapture noundef readonly %1, i32 noundef %2) #1 { | ||
; | ||
; CHECK-LABEL: @V2( | ||
; CHECK: vec.epilog.ph: | ||
; CHECK: vec.epilog.vector.body: | ||
; CHECK: vec.epilog.middle.block: | ||
; CHECK: vec.epilog.scalar.ph: | ||
; | ||
entry: | ||
%4 = icmp sgt i32 %2, 0 | ||
br i1 %4, label %5, label %8 | ||
|
||
5: | ||
%6 = zext nneg i32 %2 to i64 | ||
br label %9 | ||
|
||
7: | ||
br label %8 | ||
|
||
8: | ||
ret i32 42 | ||
|
||
9: | ||
%10 = phi i64 [ 0, %5 ], [ %16, %9 ] | ||
%11 = getelementptr inbounds double, ptr %0, i64 %10 | ||
%12 = load double, ptr %11, align 8 | ||
%13 = getelementptr inbounds double, ptr %1, i64 %10 | ||
%14 = load double, ptr %13, align 8 | ||
%15 = fadd fast double %14, %12 | ||
store double %15, ptr %11, align 8 | ||
%16 = add nuw nsw i64 %10, 1 | ||
%17 = icmp eq i64 %16, %6 | ||
br i1 %17, label %7, label %9 | ||
} | ||
|
||
; TODO: The V3 will generate a scalable vector body, so doesn't need a | ||
; epilogue loop, but will need to be checked that is really the best thing to | ||
; for the V3. | ||
; | ||
define noundef i32 @V3(ptr noalias nocapture noundef %0, ptr noalias nocapture noundef readonly %1, i32 noundef %2) #2 { | ||
; | ||
; CHECK-LABEL: @V3( | ||
; CHECK-NOT: vec.epilog.ph: | ||
; CHECK-NOT: vec.epilog.vector.body: | ||
; CHECK-NOT: vec.epilog.middle.block: | ||
; CHECK-NOT: vec.epilog.scalar.ph: | ||
; | ||
entry: | ||
%4 = icmp sgt i32 %2, 0 | ||
br i1 %4, label %5, label %8 | ||
|
||
5: | ||
%6 = zext nneg i32 %2 to i64 | ||
br label %9 | ||
|
||
7: | ||
br label %8 | ||
|
||
8: | ||
ret i32 42 | ||
|
||
9: | ||
%10 = phi i64 [ 0, %5 ], [ %16, %9 ] | ||
%11 = getelementptr inbounds double, ptr %0, i64 %10 | ||
%12 = load double, ptr %11, align 8 | ||
%13 = getelementptr inbounds double, ptr %1, i64 %10 | ||
%14 = load double, ptr %13, align 8 | ||
%15 = fadd fast double %14, %12 | ||
store double %15, ptr %11, align 8 | ||
%16 = add nuw nsw i64 %10, 1 | ||
%17 = icmp eq i64 %16, %6 | ||
br i1 %17, label %7, label %9 | ||
} | ||
|
||
attributes #0 = { vscale_range(1,16) "target-cpu"="neoverse-v1" "target-features"="+sve2" } | ||
|
||
attributes #1 = { vscale_range(1,16) "target-cpu"="neoverse-v2" "target-features"="+sve2" } | ||
|
||
attributes #2 = { vscale_range(1,16) "target-cpu"="neoverse-v3" "target-features"="+sve2" } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A comment here to explain why "4" is chosen would be nice.