-
Notifications
You must be signed in to change notification settings - Fork 12.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AMDGPU] New intrinsic void llvm.amdgcn.s.nop(i16) (#65757)
This allows front ends to insert s_nops - this is most often when a delay less than s_sleep 1 is required.
- Loading branch information
Showing
3 changed files
with
37 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py | ||
; RUN: llc -march=amdgcn -mcpu=gfx900 -verify-machineinstrs < %s | FileCheck -check-prefix=GCN %s | ||
; RUN: llc -global-isel -march=amdgcn -mcpu=gfx900 -verify-machineinstrs < %s | FileCheck -check-prefix=GCN %s | ||
|
||
define amdgpu_kernel void @test_s_nop() { | ||
; GCN-LABEL: test_s_nop: | ||
; GCN: ; %bb.0: | ||
; GCN-NEXT: s_nop 0 | ||
; GCN-NEXT: s_nop 1 | ||
; GCN-NEXT: s_nop 2 | ||
; GCN-NEXT: s_nop 3 | ||
; GCN-NEXT: s_nop 4 | ||
; GCN-NEXT: s_nop 5 | ||
; GCN-NEXT: s_nop 6 | ||
; GCN-NEXT: s_nop 7 | ||
; GCN-NEXT: s_nop 63 | ||
; GCN-NEXT: s_endpgm | ||
call void @llvm.amdgcn.s.nop(i16 0) | ||
call void @llvm.amdgcn.s.nop(i16 1) | ||
call void @llvm.amdgcn.s.nop(i16 2) | ||
call void @llvm.amdgcn.s.nop(i16 3) | ||
call void @llvm.amdgcn.s.nop(i16 4) | ||
call void @llvm.amdgcn.s.nop(i16 5) | ||
call void @llvm.amdgcn.s.nop(i16 6) | ||
call void @llvm.amdgcn.s.nop(i16 7) | ||
call void @llvm.amdgcn.s.nop(i16 63) | ||
ret void | ||
} | ||
|
||
declare void @llvm.amdgcn.s.nop(i16) |