2016-04-07 03:40:20 +08:00
|
|
|
; 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:
|
2017-11-21 02:24:21 +08:00
|
|
|
; GCN: v_add_{{[iu]}}32_e32 v0, vcc, s8, v0
|
2016-04-07 03:40:20 +08:00
|
|
|
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
|
2017-04-12 06:29:24 +08:00
|
|
|
define amdgpu_kernel void @kernel_cc(<4 x i32> inreg, <4 x i32> inreg, i32 inreg %w, float %v) {
|
2016-04-07 03:40:20 +08:00
|
|
|
%vi = bitcast float %v to i32
|
|
|
|
%x = add i32 %vi, %w
|
|
|
|
%xf = bitcast i32 %x to float
|
2017-04-12 06:29:24 +08:00
|
|
|
store float %xf, float addrspace(1)* undef
|
|
|
|
ret void
|
2016-04-07 03:40:20 +08:00
|
|
|
}
|