forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[clang][llvm][aarch64] Add aarch64_sme_in_streaming_mode intrinsic (l…
…lvm#120265) Replacing the extant streaming mode function call with an intrinsic allows us to make further optimisations around it. For example, if it's called within a function that has a known streaming mode, we can remove the dead code, and avoid the redundant conditional branch.
- Loading branch information
1 parent
064da42
commit 21b531e
Showing
7 changed files
with
89 additions
and
32 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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,18 @@ | ||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py | ||
; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sme -verify-machineinstrs < %s | FileCheck %s | ||
|
||
|
||
define i1 @streaming_mode_streaming_compatible() #0 { | ||
; CHECK-LABEL: streaming_mode_streaming_compatible: | ||
; CHECK: // %bb.0: | ||
; CHECK-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill | ||
; CHECK-NEXT: bl __arm_sme_state | ||
; CHECK-NEXT: and w0, w0, #0x1 | ||
; CHECK-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload | ||
; CHECK-NEXT: ret | ||
%mode = tail call noundef i1 @llvm.aarch64.sme.in.streaming.mode() | ||
ret i1 %mode | ||
} | ||
|
||
|
||
attributes #0 = {nounwind memory(none) "aarch64_pstate_sm_compatible"} |