1; RUN: llc -march=amdgcn -mcpu=tahiti -verify-machineinstrs < %s | FileCheck -check-prefix=GCN %s
2; RUN: llc -march=amdgcn -mcpu=tonga -verify-machineinstrs < %s | FileCheck -check-prefix=GCN %s
3
4
5; GCN-LABEL: {{^}}shader_cc:
6; GCN: v_add_{{[iu]}}32_e32 v0, vcc, s8, v0
7define amdgpu_cs float @shader_cc(<4 x i32> inreg, <4 x i32> inreg, i32 inreg %w, float %v) {
8  %vi = bitcast float %v to i32
9  %x = add i32 %vi, %w
10  %xf = bitcast i32 %x to float
11  ret float %xf
12}
13
14; GCN-LABEL: {{^}}kernel_cc:
15; GCN: s_endpgm
16define amdgpu_kernel void @kernel_cc(<4 x i32> inreg, <4 x i32> inreg, i32 inreg %w, float %v) {
17  %vi = bitcast float %v to i32
18  %x = add i32 %vi, %w
19  %xf = bitcast i32 %x to float
20  store float %xf, float addrspace(1)* undef
21  ret void
22}
23