1 ; RUN: llc -march=r600 -mcpu=bonaire < %s | FileCheck -check-prefix=CI -check-prefix=FUNC %s 2 ; RUN: llc -march=r600 -mcpu=SI < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s 3 4 declare double @llvm.ceil.f64(double) nounwind readnone 5 declare <2 x double> @llvm.ceil.v2f64(<2 x double>) nounwind readnone 6 declare <3 x double> @llvm.ceil.v3f64(<3 x double>) nounwind readnone 7 declare <4 x double> @llvm.ceil.v4f64(<4 x double>) nounwind readnone 8 declare <8 x double> @llvm.ceil.v8f64(<8 x double>) nounwind readnone 9 declare <16 x double> @llvm.ceil.v16f64(<16 x double>) nounwind readnone 10 11 ; FUNC-LABEL: @fceil_f64: 12 ; CI: V_CEIL_F64_e32 13 ; SI: S_BFE_I32 [[SEXP:s[0-9]+]], {{s[0-9]+}}, 0xb0014 14 ; SI: S_ADD_I32 s{{[0-9]+}}, [[SEXP]], 0xfffffc01 15 ; SI: S_LSHR_B64 16 ; SI: S_NOT_B64 17 ; SI: S_AND_B64 18 ; SI: S_AND_B32 s{{[0-9]+}}, s{{[0-9]+}}, 0x80000000 19 ; SI: CMP_LT_I32 20 ; SI: CNDMASK_B32 21 ; SI: CNDMASK_B32 22 ; SI: CMP_GT_I32 23 ; SI: CNDMASK_B32 24 ; SI: CNDMASK_B32 25 ; SI: CMP_GT_F64 26 ; SI: CNDMASK_B32 27 ; SI: CMP_NE_I32 28 ; SI: CNDMASK_B32 29 ; SI: CNDMASK_B32 30 ; SI: V_ADD_F64 31 define void @fceil_f64(double addrspace(1)* %out, double %x) { 32 %y = call double @llvm.ceil.f64(double %x) nounwind readnone 33 store double %y, double addrspace(1)* %out 34 ret void 35 } 36 37 ; FUNC-LABEL: @fceil_v2f64: 38 ; CI: V_CEIL_F64_e32 39 ; CI: V_CEIL_F64_e32 40 define void @fceil_v2f64(<2 x double> addrspace(1)* %out, <2 x double> %x) { 41 %y = call <2 x double> @llvm.ceil.v2f64(<2 x double> %x) nounwind readnone 42 store <2 x double> %y, <2 x double> addrspace(1)* %out 43 ret void 44 } 45 46 ; FIXME-FUNC-LABEL: @fceil_v3f64: 47 ; FIXME-CI: V_CEIL_F64_e32 48 ; FIXME-CI: V_CEIL_F64_e32 49 ; FIXME-CI: V_CEIL_F64_e32 50 ; define void @fceil_v3f64(<3 x double> addrspace(1)* %out, <3 x double> %x) { 51 ; %y = call <3 x double> @llvm.ceil.v3f64(<3 x double> %x) nounwind readnone 52 ; store <3 x double> %y, <3 x double> addrspace(1)* %out 53 ; ret void 54 ; } 55 56 ; FUNC-LABEL: @fceil_v4f64: 57 ; CI: V_CEIL_F64_e32 58 ; CI: V_CEIL_F64_e32 59 ; CI: V_CEIL_F64_e32 60 ; CI: V_CEIL_F64_e32 61 define void @fceil_v4f64(<4 x double> addrspace(1)* %out, <4 x double> %x) { 62 %y = call <4 x double> @llvm.ceil.v4f64(<4 x double> %x) nounwind readnone 63 store <4 x double> %y, <4 x double> addrspace(1)* %out 64 ret void 65 } 66 67 ; FUNC-LABEL: @fceil_v8f64: 68 ; CI: V_CEIL_F64_e32 69 ; CI: V_CEIL_F64_e32 70 ; CI: V_CEIL_F64_e32 71 ; CI: V_CEIL_F64_e32 72 ; CI: V_CEIL_F64_e32 73 ; CI: V_CEIL_F64_e32 74 ; CI: V_CEIL_F64_e32 75 ; CI: V_CEIL_F64_e32 76 define void @fceil_v8f64(<8 x double> addrspace(1)* %out, <8 x double> %x) { 77 %y = call <8 x double> @llvm.ceil.v8f64(<8 x double> %x) nounwind readnone 78 store <8 x double> %y, <8 x double> addrspace(1)* %out 79 ret void 80 } 81 82 ; FUNC-LABEL: @fceil_v16f64: 83 ; CI: V_CEIL_F64_e32 84 ; CI: V_CEIL_F64_e32 85 ; CI: V_CEIL_F64_e32 86 ; CI: V_CEIL_F64_e32 87 ; CI: V_CEIL_F64_e32 88 ; CI: V_CEIL_F64_e32 89 ; CI: V_CEIL_F64_e32 90 ; CI: V_CEIL_F64_e32 91 ; CI: V_CEIL_F64_e32 92 ; CI: V_CEIL_F64_e32 93 ; CI: V_CEIL_F64_e32 94 ; CI: V_CEIL_F64_e32 95 ; CI: V_CEIL_F64_e32 96 ; CI: V_CEIL_F64_e32 97 ; CI: V_CEIL_F64_e32 98 ; CI: V_CEIL_F64_e32 99 define void @fceil_v16f64(<16 x double> addrspace(1)* %out, <16 x double> %x) { 100 %y = call <16 x double> @llvm.ceil.v16f64(<16 x double> %x) nounwind readnone 101 store <16 x double> %y, <16 x double> addrspace(1)* %out 102 ret void 103 } 104