-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[AArch64][SME] Add support for sme-fa64 #70809
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
Show all changes
10 commits
Select commit
Hold shift + click to select a range
106913d
[AArch64][SME] Add support for sme-fa64
MDevereau 470db8a
[AArch64][SME] Add support for sme-fa64
MDevereau 64ff862
Remove whitespace from .s tests
MDevereau 114dda0
Update cpu_model.c and clang AArch64 targets
MDevereau fb60cf1
Add isNeonAvailable test
MDevereau 9831991
Fix whitespace
MDevereau b637940
imply sve2, reorder enums
MDevereau 9f004d1
Remove NEON implication and FMV dependencies
MDevereau 75de0cf
Remove remaining cpu_target FA64 enums
MDevereau 0b4981d
Remove whitespace character
MDevereau 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
33 changes: 33 additions & 0 deletions
33
llvm/test/CodeGen/AArch64/sve-streaming-mode-fixed-length-fp-reduce-fa64.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,33 @@ | ||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py | ||
; RUN: llc -mattr=+sme-fa64 -force-streaming-compatible-sve < %s | FileCheck %s -check-prefix=FA64 | ||
; RUN: llc -mattr=+sve -force-streaming-compatible-sve < %s | FileCheck %s -check-prefix=NO-FA64 | ||
|
||
|
||
target triple = "aarch64-unknown-linux-gnu" | ||
|
||
define half @fadda_v4f16(half %start, <4 x half> %a) { | ||
; FA64-LABEL: fadda_v4f16: | ||
; FA64: // %bb.0: | ||
; FA64-NEXT: ptrue p0.h, vl4 | ||
; FA64-NEXT: // kill: def $h0 killed $h0 def $z0 | ||
; FA64-NEXT: // kill: def $d1 killed $d1 def $z1 | ||
; FA64-NEXT: fadda h0, p0, h0, z1.h | ||
; FA64-NEXT: // kill: def $h0 killed $h0 killed $z0 | ||
; FA64-NEXT: ret | ||
; | ||
; NO-FA64-LABEL: fadda_v4f16: | ||
; NO-FA64: // %bb.0: | ||
; NO-FA64-NEXT: // kill: def $d1 killed $d1 def $z1 | ||
; NO-FA64-NEXT: fadd h0, h0, h1 | ||
; NO-FA64-NEXT: mov z2.h, z1.h[1] | ||
; NO-FA64-NEXT: fadd h0, h0, h2 | ||
; NO-FA64-NEXT: mov z2.h, z1.h[2] | ||
; NO-FA64-NEXT: mov z1.h, z1.h[3] | ||
; NO-FA64-NEXT: fadd h0, h0, h2 | ||
; NO-FA64-NEXT: fadd h0, h0, h1 | ||
; NO-FA64-NEXT: ret | ||
%res = call half @llvm.vector.reduce.fadd.v4f16(half %start, <4 x half> %a) | ||
ret half %res | ||
} | ||
|
||
declare half @llvm.vector.reduce.fadd.v4f16(half, <4 x half>) |
26 changes: 26 additions & 0 deletions
26
llvm/test/CodeGen/AArch64/sve-streaming-mode-fixed-length-int-mla-neon-fa64.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,26 @@ | ||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py | ||
; RUN: llc -mattr=+sme-fa64 -force-streaming-compatible-sve < %s | FileCheck %s -check-prefix=FA64 | ||
; RUN: llc -mattr=+sve -force-streaming-compatible-sve < %s | FileCheck %s -check-prefix=NO-FA64 | ||
|
||
target triple = "aarch64-unknown-linux-gnu" | ||
|
||
define <8 x i8> @mla8xi8(<8 x i8> %A, <8 x i8> %B, <8 x i8> %C) { | ||
; FA64-LABEL: mla8xi8: | ||
; FA64: // %bb.0: | ||
; FA64-NEXT: mla v2.8b, v0.8b, v1.8b | ||
; FA64-NEXT: fmov d0, d2 | ||
; FA64-NEXT: ret | ||
; | ||
; NO-FA64-LABEL: mla8xi8: | ||
; NO-FA64: // %bb.0: | ||
; NO-FA64-NEXT: ptrue p0.b, vl8 | ||
; NO-FA64-NEXT: // kill: def $d0 killed $d0 def $z0 | ||
; NO-FA64-NEXT: // kill: def $d2 killed $d2 def $z2 | ||
; NO-FA64-NEXT: // kill: def $d1 killed $d1 def $z1 | ||
; NO-FA64-NEXT: mad z0.b, p0/m, z1.b, z2.b | ||
; NO-FA64-NEXT: // kill: def $d0 killed $d0 killed $z0 | ||
; NO-FA64-NEXT: ret | ||
%tmp1 = mul <8 x i8> %A, %B; | ||
%tmp2 = add <8 x i8> %C, %tmp1; | ||
ret <8 x i8> %tmp2 | ||
} |
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,5 @@ | ||
// RUN: llvm-mc -triple aarch64-none-linux-gnu -show-encoding -mattr=+sme-fa64 < %s | FileCheck %s | ||
|
||
// Verify sme-fa64 implies SVE2 | ||
ldnt1sh z0.s, p0/z, [z1.s] | ||
// CHECK: ldnt1sh { z0.s }, p0/z, [z1.s] |
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
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.
Could you add a similar test where a Neon instruction would be used when
sme-fa64
is set? (and where it would be scalarised otherwise)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.
Added test
llvm/test/CodeGen/AArch64/sve-streaming-mode-fixed-length-int-mla-neon-fa64.ll