mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-13 06:38:44 +00:00
ea7a0c0467
This makes it possible to distinguish between mesa shaders and other kernels even in the presence of compute shaders. Patch By: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Differential Revision: http://reviews.llvm.org/D18559 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265589 91177308-0d34-0410-b5e6-96231b3b80d8
22 lines
697 B
LLVM
22 lines
697 B
LLVM
; RUN: llc -march=amdgcn -mcpu=tahiti -verify-machineinstrs < %s | FileCheck -check-prefix=GCN %s
|
|
; RUN: llc -march=amdgcn -mcpu=tonga -verify-machineinstrs < %s | FileCheck -check-prefix=GCN %s
|
|
|
|
|
|
; GCN-LABEL: {{^}}shader_cc:
|
|
; GCN: v_add_i32_e32 v0, vcc, s8, v0
|
|
define amdgpu_cs float @shader_cc(<4 x i32> inreg, <4 x i32> inreg, i32 inreg %w, float %v) {
|
|
%vi = bitcast float %v to i32
|
|
%x = add i32 %vi, %w
|
|
%xf = bitcast i32 %x to float
|
|
ret float %xf
|
|
}
|
|
|
|
; GCN-LABEL: {{^}}kernel_cc:
|
|
; GCN: s_endpgm
|
|
define float @kernel_cc(<4 x i32> inreg, <4 x i32> inreg, i32 inreg %w, float %v) {
|
|
%vi = bitcast float %v to i32
|
|
%x = add i32 %vi, %w
|
|
%xf = bitcast i32 %x to float
|
|
ret float %xf
|
|
}
|