forked from llvm-mirror/llvm
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AMDGPU] add s_incperflevel/s_decperflevel intrinsics.
Differential revision: https://reviews.llvm.org/D23666 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279106 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
Showing
4 changed files
with
108 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
; RUN: llc -march=amdgcn -verify-machineinstrs < %s | FileCheck -check-prefix=GCN %s | ||
; RUN: llc -march=amdgcn -mcpu=tonga -verify-machineinstrs < %s | FileCheck -check-prefix=GCN %s | ||
|
||
declare void @llvm.amdgcn.s.decperflevel(i32) #0 | ||
|
||
; GCN-LABEL: {{^}}test_s_decperflevel: | ||
; GCN: s_decperflevel 0{{$}} | ||
; GCN: s_decperflevel 1{{$}} | ||
; GCN: s_decperflevel 2{{$}} | ||
; GCN: s_decperflevel 3{{$}} | ||
; GCN: s_decperflevel 4{{$}} | ||
; GCN: s_decperflevel 5{{$}} | ||
; GCN: s_decperflevel 6{{$}} | ||
; GCN: s_decperflevel 7{{$}} | ||
; GCN: s_decperflevel 8{{$}} | ||
; GCN: s_decperflevel 9{{$}} | ||
; GCN: s_decperflevel 10{{$}} | ||
; GCN: s_decperflevel 11{{$}} | ||
; GCN: s_decperflevel 12{{$}} | ||
; GCN: s_decperflevel 13{{$}} | ||
; GCN: s_decperflevel 14{{$}} | ||
; GCN: s_decperflevel 15{{$}} | ||
define void @test_s_decperflevel(i32 %x) #0 { | ||
call void @llvm.amdgcn.s.decperflevel(i32 0) | ||
call void @llvm.amdgcn.s.decperflevel(i32 1) | ||
call void @llvm.amdgcn.s.decperflevel(i32 2) | ||
call void @llvm.amdgcn.s.decperflevel(i32 3) | ||
call void @llvm.amdgcn.s.decperflevel(i32 4) | ||
call void @llvm.amdgcn.s.decperflevel(i32 5) | ||
call void @llvm.amdgcn.s.decperflevel(i32 6) | ||
call void @llvm.amdgcn.s.decperflevel(i32 7) | ||
call void @llvm.amdgcn.s.decperflevel(i32 8) | ||
call void @llvm.amdgcn.s.decperflevel(i32 9) | ||
call void @llvm.amdgcn.s.decperflevel(i32 10) | ||
call void @llvm.amdgcn.s.decperflevel(i32 11) | ||
call void @llvm.amdgcn.s.decperflevel(i32 12) | ||
call void @llvm.amdgcn.s.decperflevel(i32 13) | ||
call void @llvm.amdgcn.s.decperflevel(i32 14) | ||
call void @llvm.amdgcn.s.decperflevel(i32 15) | ||
ret void | ||
} | ||
|
||
attributes #0 = { nounwind } |
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,43 @@ | ||
; RUN: llc -march=amdgcn -verify-machineinstrs < %s | FileCheck -check-prefix=GCN %s | ||
; RUN: llc -march=amdgcn -mcpu=tonga -verify-machineinstrs < %s | FileCheck -check-prefix=GCN %s | ||
|
||
declare void @llvm.amdgcn.s.incperflevel(i32) #0 | ||
|
||
; GCN-LABEL: {{^}}test_s_incperflevel: | ||
; GCN: s_incperflevel 0{{$}} | ||
; GCN: s_incperflevel 1{{$}} | ||
; GCN: s_incperflevel 2{{$}} | ||
; GCN: s_incperflevel 3{{$}} | ||
; GCN: s_incperflevel 4{{$}} | ||
; GCN: s_incperflevel 5{{$}} | ||
; GCN: s_incperflevel 6{{$}} | ||
; GCN: s_incperflevel 7{{$}} | ||
; GCN: s_incperflevel 8{{$}} | ||
; GCN: s_incperflevel 9{{$}} | ||
; GCN: s_incperflevel 10{{$}} | ||
; GCN: s_incperflevel 11{{$}} | ||
; GCN: s_incperflevel 12{{$}} | ||
; GCN: s_incperflevel 13{{$}} | ||
; GCN: s_incperflevel 14{{$}} | ||
; GCN: s_incperflevel 15{{$}} | ||
define void @test_s_incperflevel(i32 %x) #0 { | ||
call void @llvm.amdgcn.s.incperflevel(i32 0) | ||
call void @llvm.amdgcn.s.incperflevel(i32 1) | ||
call void @llvm.amdgcn.s.incperflevel(i32 2) | ||
call void @llvm.amdgcn.s.incperflevel(i32 3) | ||
call void @llvm.amdgcn.s.incperflevel(i32 4) | ||
call void @llvm.amdgcn.s.incperflevel(i32 5) | ||
call void @llvm.amdgcn.s.incperflevel(i32 6) | ||
call void @llvm.amdgcn.s.incperflevel(i32 7) | ||
call void @llvm.amdgcn.s.incperflevel(i32 8) | ||
call void @llvm.amdgcn.s.incperflevel(i32 9) | ||
call void @llvm.amdgcn.s.incperflevel(i32 10) | ||
call void @llvm.amdgcn.s.incperflevel(i32 11) | ||
call void @llvm.amdgcn.s.incperflevel(i32 12) | ||
call void @llvm.amdgcn.s.incperflevel(i32 13) | ||
call void @llvm.amdgcn.s.incperflevel(i32 14) | ||
call void @llvm.amdgcn.s.incperflevel(i32 15) | ||
ret void | ||
} | ||
|
||
attributes #0 = { nounwind } |