forked from llvm-mirror/llvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Verifier: Check some amdgpu calling convention restrictions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299457 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
Showing
3 changed files
with
70 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,55 @@ | ||
; RUN: not llvm-as < %s 2>&1 | FileCheck %s | ||
|
||
; CHECK: Calling convention requires void return type | ||
; CHECK-NEXT: i32 ()* @nonvoid_cc_amdgpu_kernel | ||
define amdgpu_kernel i32 @nonvoid_cc_amdgpu_kernel() { | ||
ret i32 0 | ||
} | ||
|
||
; CHECK: Calling convention does not support varargs or perfect forwarding! | ||
; CHECK-NEXT: void (...)* @varargs_amdgpu_kernel | ||
define amdgpu_kernel void @varargs_amdgpu_kernel(...) { | ||
ret void | ||
} | ||
|
||
; CHECK: Calling convention does not allow sret | ||
; CHECK-NEXT: void (i32*)* @sret_cc_amdgpu_kernel | ||
define amdgpu_kernel void @sret_cc_amdgpu_kernel(i32* sret %ptr) { | ||
ret void | ||
} | ||
|
||
; CHECK: Calling convention does not support varargs or perfect forwarding! | ||
; CHECK-NEXT: void (...)* @varargs_amdgpu_vs | ||
define amdgpu_vs void @varargs_amdgpu_vs(...) { | ||
ret void | ||
} | ||
|
||
; CHECK: Calling convention does not support varargs or perfect forwarding! | ||
; CHECK-NEXT: void (...)* @varargs_amdgpu_gs | ||
define amdgpu_gs void @varargs_amdgpu_gs(...) { | ||
ret void | ||
} | ||
|
||
; CHECK: Calling convention does not support varargs or perfect forwarding! | ||
; CHECK-NEXT: void (...)* @varargs_amdgpu_ps | ||
define amdgpu_ps void @varargs_amdgpu_ps(...) { | ||
ret void | ||
} | ||
|
||
; CHECK: Calling convention does not support varargs or perfect forwarding! | ||
; CHECK-NEXT: void (...)* @varargs_amdgpu_cs | ||
define amdgpu_cs void @varargs_amdgpu_cs(...) { | ||
ret void | ||
} | ||
|
||
; CHECK: Calling convention requires void return type | ||
; CHECK-NEXT: i32 ()* @nonvoid_cc_spir_kernel | ||
define spir_kernel i32 @nonvoid_cc_spir_kernel() { | ||
ret i32 0 | ||
} | ||
|
||
; CHECK: Calling convention does not support varargs or perfect forwarding! | ||
; CHECK-NEXT: void (...)* @varargs_spir_kernel | ||
define spir_kernel void @varargs_spir_kernel(...) { | ||
ret void | ||
} |