1*9880d681SAndroid Build Coastguard Worker; RUN: llc -march=amdgcn -mcpu=SI -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s 2*9880d681SAndroid Build Coastguard Worker; RUN: llc -march=amdgcn -mcpu=tonga -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s 3*9880d681SAndroid Build Coastguard Worker; RUN: llc -march=r600 -mcpu=cypress < %s | FileCheck -check-prefix=EG -check-prefix=FUNC %s 4*9880d681SAndroid Build Coastguard Worker 5*9880d681SAndroid Build Coastguard Workerdeclare float @llvm.ceil.f32(float) nounwind readnone 6*9880d681SAndroid Build Coastguard Workerdeclare <2 x float> @llvm.ceil.v2f32(<2 x float>) nounwind readnone 7*9880d681SAndroid Build Coastguard Workerdeclare <3 x float> @llvm.ceil.v3f32(<3 x float>) nounwind readnone 8*9880d681SAndroid Build Coastguard Workerdeclare <4 x float> @llvm.ceil.v4f32(<4 x float>) nounwind readnone 9*9880d681SAndroid Build Coastguard Workerdeclare <8 x float> @llvm.ceil.v8f32(<8 x float>) nounwind readnone 10*9880d681SAndroid Build Coastguard Workerdeclare <16 x float> @llvm.ceil.v16f32(<16 x float>) nounwind readnone 11*9880d681SAndroid Build Coastguard Worker 12*9880d681SAndroid Build Coastguard Worker; FUNC-LABEL: {{^}}fceil_f32: 13*9880d681SAndroid Build Coastguard Worker; SI: v_ceil_f32_e32 14*9880d681SAndroid Build Coastguard Worker; EG: MEM_RAT_CACHELESS STORE_RAW [[RESULT:T[0-9]+\.[XYZW]]] 15*9880d681SAndroid Build Coastguard Worker; EG: CEIL {{\*? *}}[[RESULT]] 16*9880d681SAndroid Build Coastguard Workerdefine void @fceil_f32(float addrspace(1)* %out, float %x) { 17*9880d681SAndroid Build Coastguard Worker %y = call float @llvm.ceil.f32(float %x) nounwind readnone 18*9880d681SAndroid Build Coastguard Worker store float %y, float addrspace(1)* %out 19*9880d681SAndroid Build Coastguard Worker ret void 20*9880d681SAndroid Build Coastguard Worker} 21*9880d681SAndroid Build Coastguard Worker 22*9880d681SAndroid Build Coastguard Worker; FUNC-LABEL: {{^}}fceil_v2f32: 23*9880d681SAndroid Build Coastguard Worker; SI: v_ceil_f32_e32 24*9880d681SAndroid Build Coastguard Worker; SI: v_ceil_f32_e32 25*9880d681SAndroid Build Coastguard Worker; EG: MEM_RAT_CACHELESS STORE_RAW [[RESULT:T[0-9]+]]{{\.[XYZW]}} 26*9880d681SAndroid Build Coastguard Worker; EG: CEIL {{\*? *}}[[RESULT]] 27*9880d681SAndroid Build Coastguard Worker; EG: CEIL {{\*? *}}[[RESULT]] 28*9880d681SAndroid Build Coastguard Workerdefine void @fceil_v2f32(<2 x float> addrspace(1)* %out, <2 x float> %x) { 29*9880d681SAndroid Build Coastguard Worker %y = call <2 x float> @llvm.ceil.v2f32(<2 x float> %x) nounwind readnone 30*9880d681SAndroid Build Coastguard Worker store <2 x float> %y, <2 x float> addrspace(1)* %out 31*9880d681SAndroid Build Coastguard Worker ret void 32*9880d681SAndroid Build Coastguard Worker} 33*9880d681SAndroid Build Coastguard Worker 34*9880d681SAndroid Build Coastguard Worker; FUNC-LABEL: {{^}}fceil_v3f32: 35*9880d681SAndroid Build Coastguard Worker; FIXME-SI: v_ceil_f32_e32 36*9880d681SAndroid Build Coastguard Worker; FIXME-SI: v_ceil_f32_e32 37*9880d681SAndroid Build Coastguard Worker; FIXME-SI: v_ceil_f32_e32 38*9880d681SAndroid Build Coastguard Worker; FIXME-EG: v3 is treated as v2 and v1, hence 2 stores 39*9880d681SAndroid Build Coastguard Worker; EG: MEM_RAT_CACHELESS STORE_RAW [[RESULT1:T[0-9]+]]{{\.[XYZW]}} 40*9880d681SAndroid Build Coastguard Worker; EG: MEM_RAT_CACHELESS STORE_RAW [[RESULT2:T[0-9]+]]{{\.[XYZW]}} 41*9880d681SAndroid Build Coastguard Worker; EG-DAG: CEIL {{\*? *}}[[RESULT1]] 42*9880d681SAndroid Build Coastguard Worker; EG-DAG: CEIL {{\*? *}}[[RESULT2]] 43*9880d681SAndroid Build Coastguard Worker; EG-DAG: CEIL {{\*? *}}[[RESULT2]] 44*9880d681SAndroid Build Coastguard Workerdefine void @fceil_v3f32(<3 x float> addrspace(1)* %out, <3 x float> %x) { 45*9880d681SAndroid Build Coastguard Worker %y = call <3 x float> @llvm.ceil.v3f32(<3 x float> %x) nounwind readnone 46*9880d681SAndroid Build Coastguard Worker store <3 x float> %y, <3 x float> addrspace(1)* %out 47*9880d681SAndroid Build Coastguard Worker ret void 48*9880d681SAndroid Build Coastguard Worker} 49*9880d681SAndroid Build Coastguard Worker 50*9880d681SAndroid Build Coastguard Worker; FUNC-LABEL: {{^}}fceil_v4f32: 51*9880d681SAndroid Build Coastguard Worker; SI: v_ceil_f32_e32 52*9880d681SAndroid Build Coastguard Worker; SI: v_ceil_f32_e32 53*9880d681SAndroid Build Coastguard Worker; SI: v_ceil_f32_e32 54*9880d681SAndroid Build Coastguard Worker; SI: v_ceil_f32_e32 55*9880d681SAndroid Build Coastguard Worker; EG: MEM_RAT_CACHELESS STORE_RAW [[RESULT:T[0-9]+]]{{\.[XYZW]}} 56*9880d681SAndroid Build Coastguard Worker; EG: CEIL {{\*? *}}[[RESULT]] 57*9880d681SAndroid Build Coastguard Worker; EG: CEIL {{\*? *}}[[RESULT]] 58*9880d681SAndroid Build Coastguard Worker; EG: CEIL {{\*? *}}[[RESULT]] 59*9880d681SAndroid Build Coastguard Worker; EG: CEIL {{\*? *}}[[RESULT]] 60*9880d681SAndroid Build Coastguard Workerdefine void @fceil_v4f32(<4 x float> addrspace(1)* %out, <4 x float> %x) { 61*9880d681SAndroid Build Coastguard Worker %y = call <4 x float> @llvm.ceil.v4f32(<4 x float> %x) nounwind readnone 62*9880d681SAndroid Build Coastguard Worker store <4 x float> %y, <4 x float> addrspace(1)* %out 63*9880d681SAndroid Build Coastguard Worker ret void 64*9880d681SAndroid Build Coastguard Worker} 65*9880d681SAndroid Build Coastguard Worker 66*9880d681SAndroid Build Coastguard Worker; FUNC-LABEL: {{^}}fceil_v8f32: 67*9880d681SAndroid Build Coastguard Worker; SI: v_ceil_f32_e32 68*9880d681SAndroid Build Coastguard Worker; SI: v_ceil_f32_e32 69*9880d681SAndroid Build Coastguard Worker; SI: v_ceil_f32_e32 70*9880d681SAndroid Build Coastguard Worker; SI: v_ceil_f32_e32 71*9880d681SAndroid Build Coastguard Worker; SI: v_ceil_f32_e32 72*9880d681SAndroid Build Coastguard Worker; SI: v_ceil_f32_e32 73*9880d681SAndroid Build Coastguard Worker; SI: v_ceil_f32_e32 74*9880d681SAndroid Build Coastguard Worker; SI: v_ceil_f32_e32 75*9880d681SAndroid Build Coastguard Worker; EG: MEM_RAT_CACHELESS STORE_RAW [[RESULT1:T[0-9]+]]{{\.[XYZW]}} 76*9880d681SAndroid Build Coastguard Worker; EG: MEM_RAT_CACHELESS STORE_RAW [[RESULT2:T[0-9]+]]{{\.[XYZW]}} 77*9880d681SAndroid Build Coastguard Worker; EG-DAG: CEIL {{\*? *}}[[RESULT1]] 78*9880d681SAndroid Build Coastguard Worker; EG-DAG: CEIL {{\*? *}}[[RESULT1]] 79*9880d681SAndroid Build Coastguard Worker; EG-DAG: CEIL {{\*? *}}[[RESULT1]] 80*9880d681SAndroid Build Coastguard Worker; EG-DAG: CEIL {{\*? *}}[[RESULT1]] 81*9880d681SAndroid Build Coastguard Worker; EG-DAG: CEIL {{\*? *}}[[RESULT2]] 82*9880d681SAndroid Build Coastguard Worker; EG-DAG: CEIL {{\*? *}}[[RESULT2]] 83*9880d681SAndroid Build Coastguard Worker; EG-DAG: CEIL {{\*? *}}[[RESULT2]] 84*9880d681SAndroid Build Coastguard Worker; EG-DAG: CEIL {{\*? *}}[[RESULT2]] 85*9880d681SAndroid Build Coastguard Workerdefine void @fceil_v8f32(<8 x float> addrspace(1)* %out, <8 x float> %x) { 86*9880d681SAndroid Build Coastguard Worker %y = call <8 x float> @llvm.ceil.v8f32(<8 x float> %x) nounwind readnone 87*9880d681SAndroid Build Coastguard Worker store <8 x float> %y, <8 x float> addrspace(1)* %out 88*9880d681SAndroid Build Coastguard Worker ret void 89*9880d681SAndroid Build Coastguard Worker} 90*9880d681SAndroid Build Coastguard Worker 91*9880d681SAndroid Build Coastguard Worker; FUNC-LABEL: {{^}}fceil_v16f32: 92*9880d681SAndroid Build Coastguard Worker; SI: v_ceil_f32_e32 93*9880d681SAndroid Build Coastguard Worker; SI: v_ceil_f32_e32 94*9880d681SAndroid Build Coastguard Worker; SI: v_ceil_f32_e32 95*9880d681SAndroid Build Coastguard Worker; SI: v_ceil_f32_e32 96*9880d681SAndroid Build Coastguard Worker; SI: v_ceil_f32_e32 97*9880d681SAndroid Build Coastguard Worker; SI: v_ceil_f32_e32 98*9880d681SAndroid Build Coastguard Worker; SI: v_ceil_f32_e32 99*9880d681SAndroid Build Coastguard Worker; SI: v_ceil_f32_e32 100*9880d681SAndroid Build Coastguard Worker; SI: v_ceil_f32_e32 101*9880d681SAndroid Build Coastguard Worker; SI: v_ceil_f32_e32 102*9880d681SAndroid Build Coastguard Worker; SI: v_ceil_f32_e32 103*9880d681SAndroid Build Coastguard Worker; SI: v_ceil_f32_e32 104*9880d681SAndroid Build Coastguard Worker; SI: v_ceil_f32_e32 105*9880d681SAndroid Build Coastguard Worker; SI: v_ceil_f32_e32 106*9880d681SAndroid Build Coastguard Worker; SI: v_ceil_f32_e32 107*9880d681SAndroid Build Coastguard Worker; SI: v_ceil_f32_e32 108*9880d681SAndroid Build Coastguard Worker; EG: MEM_RAT_CACHELESS STORE_RAW [[RESULT1:T[0-9]+]]{{\.[XYZW]}} 109*9880d681SAndroid Build Coastguard Worker; EG: MEM_RAT_CACHELESS STORE_RAW [[RESULT2:T[0-9]+]]{{\.[XYZW]}} 110*9880d681SAndroid Build Coastguard Worker; EG: MEM_RAT_CACHELESS STORE_RAW [[RESULT3:T[0-9]+]]{{\.[XYZW]}} 111*9880d681SAndroid Build Coastguard Worker; EG: MEM_RAT_CACHELESS STORE_RAW [[RESULT4:T[0-9]+]]{{\.[XYZW]}} 112*9880d681SAndroid Build Coastguard Worker; EG-DAG: CEIL {{\*? *}}[[RESULT1]] 113*9880d681SAndroid Build Coastguard Worker; EG-DAG: CEIL {{\*? *}}[[RESULT1]] 114*9880d681SAndroid Build Coastguard Worker; EG-DAG: CEIL {{\*? *}}[[RESULT1]] 115*9880d681SAndroid Build Coastguard Worker; EG-DAG: CEIL {{\*? *}}[[RESULT1]] 116*9880d681SAndroid Build Coastguard Worker; EG-DAG: CEIL {{\*? *}}[[RESULT2]] 117*9880d681SAndroid Build Coastguard Worker; EG-DAG: CEIL {{\*? *}}[[RESULT2]] 118*9880d681SAndroid Build Coastguard Worker; EG-DAG: CEIL {{\*? *}}[[RESULT2]] 119*9880d681SAndroid Build Coastguard Worker; EG-DAG: CEIL {{\*? *}}[[RESULT2]] 120*9880d681SAndroid Build Coastguard Worker; EG-DAG: CEIL {{\*? *}}[[RESULT3]] 121*9880d681SAndroid Build Coastguard Worker; EG-DAG: CEIL {{\*? *}}[[RESULT3]] 122*9880d681SAndroid Build Coastguard Worker; EG-DAG: CEIL {{\*? *}}[[RESULT3]] 123*9880d681SAndroid Build Coastguard Worker; EG-DAG: CEIL {{\*? *}}[[RESULT3]] 124*9880d681SAndroid Build Coastguard Worker; EG-DAG: CEIL {{\*? *}}[[RESULT4]] 125*9880d681SAndroid Build Coastguard Worker; EG-DAG: CEIL {{\*? *}}[[RESULT4]] 126*9880d681SAndroid Build Coastguard Worker; EG-DAG: CEIL {{\*? *}}[[RESULT4]] 127*9880d681SAndroid Build Coastguard Worker; EG-DAG: CEIL {{\*? *}}[[RESULT4]] 128*9880d681SAndroid Build Coastguard Workerdefine void @fceil_v16f32(<16 x float> addrspace(1)* %out, <16 x float> %x) { 129*9880d681SAndroid Build Coastguard Worker %y = call <16 x float> @llvm.ceil.v16f32(<16 x float> %x) nounwind readnone 130*9880d681SAndroid Build Coastguard Worker store <16 x float> %y, <16 x float> addrspace(1)* %out 131*9880d681SAndroid Build Coastguard Worker ret void 132*9880d681SAndroid Build Coastguard Worker} 133