50 lines · plain
1; RUN: llc -mtriple=amdgcn < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s2; RUN: llc -mtriple=amdgcn -mcpu=tonga -mattr=-flat-for-global < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s3; RUN: llc -mtriple=r600 -mcpu=redwood < %s | FileCheck -check-prefix=R600 -check-prefix=FUNC %s4 5; FUNC-LABEL: {{^}}floor_f32:6; SI: v_floor_f32_e327; R600: FLOOR8define amdgpu_kernel void @floor_f32(ptr addrspace(1) %out, float %in) {9 %tmp = call float @llvm.floor.f32(float %in) #010 store float %tmp, ptr addrspace(1) %out11 ret void12}13 14; FUNC-LABEL: {{^}}floor_v2f32:15; SI: v_floor_f32_e3216; SI: v_floor_f32_e3217 18define amdgpu_kernel void @floor_v2f32(ptr addrspace(1) %out, <2 x float> %in) {19 %tmp = call <2 x float> @llvm.floor.v2f32(<2 x float> %in) #020 store <2 x float> %tmp, ptr addrspace(1) %out21 ret void22}23 24; FUNC-LABEL: {{^}}floor_v4f32:25; SI: v_floor_f32_e3226; SI: v_floor_f32_e3227; SI: v_floor_f32_e3228; SI: v_floor_f32_e3229 30; R600: FLOOR31; R600: FLOOR32; R600: FLOOR33; R600: FLOOR34define amdgpu_kernel void @floor_v4f32(ptr addrspace(1) %out, <4 x float> %in) {35 %tmp = call <4 x float> @llvm.floor.v4f32(<4 x float> %in) #036 store <4 x float> %tmp, ptr addrspace(1) %out37 ret void38}39 40; Function Attrs: nounwind readonly41declare float @llvm.floor.f32(float) #042 43; Function Attrs: nounwind readonly44declare <2 x float> @llvm.floor.v2f32(<2 x float>) #045 46; Function Attrs: nounwind readonly47declare <4 x float> @llvm.floor.v4f32(<4 x float>) #048 49attributes #0 = { nounwind readnone }50