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
4 declare double @llvm.floor.f64(double) nounwind readnone
5 declare <2 x double> @llvm.floor.v2f64(<2 x double>) nounwind readnone
6 declare <3 x double> @llvm.floor.v3f64(<3 x double>) nounwind readnone
7 declare <4 x double> @llvm.floor.v4f64(<4 x double>) nounwind readnone
8 declare <8 x double> @llvm.floor.v8f64(<8 x double>) nounwind readnone
9 declare <16 x double> @llvm.floor.v16f64(<16 x double>) nounwind readnone
11 ; FUNC-LABEL: @ffloor_f64:
14 ; SI: S_BFE_I32 [[SEXP:s[0-9]+]], {{s[0-9]+}}, 0xb0014
15 ; SI: S_ADD_I32 s{{[0-9]+}}, [[SEXP]], 0xfffffc01
19 ; SI: S_AND_B32 s{{[0-9]+}}, s{{[0-9]+}}, 0x80000000
32 define void @ffloor_f64(double addrspace(1)* %out, double %x) {
33 %y = call double @llvm.floor.f64(double %x) nounwind readnone
34 store double %y, double addrspace(1)* %out
38 ; FUNC-LABEL: @ffloor_v2f64:
41 define void @ffloor_v2f64(<2 x double> addrspace(1)* %out, <2 x double> %x) {
42 %y = call <2 x double> @llvm.floor.v2f64(<2 x double> %x) nounwind readnone
43 store <2 x double> %y, <2 x double> addrspace(1)* %out
47 ; FIXME-FUNC-LABEL: @ffloor_v3f64:
48 ; FIXME-CI: V_FLOOR_F64_e32
49 ; FIXME-CI: V_FLOOR_F64_e32
50 ; FIXME-CI: V_FLOOR_F64_e32
51 ; define void @ffloor_v3f64(<3 x double> addrspace(1)* %out, <3 x double> %x) {
52 ; %y = call <3 x double> @llvm.floor.v3f64(<3 x double> %x) nounwind readnone
53 ; store <3 x double> %y, <3 x double> addrspace(1)* %out
57 ; FUNC-LABEL: @ffloor_v4f64:
62 define void @ffloor_v4f64(<4 x double> addrspace(1)* %out, <4 x double> %x) {
63 %y = call <4 x double> @llvm.floor.v4f64(<4 x double> %x) nounwind readnone
64 store <4 x double> %y, <4 x double> addrspace(1)* %out
68 ; FUNC-LABEL: @ffloor_v8f64:
77 define void @ffloor_v8f64(<8 x double> addrspace(1)* %out, <8 x double> %x) {
78 %y = call <8 x double> @llvm.floor.v8f64(<8 x double> %x) nounwind readnone
79 store <8 x double> %y, <8 x double> addrspace(1)* %out
83 ; FUNC-LABEL: @ffloor_v16f64:
100 define void @ffloor_v16f64(<16 x double> addrspace(1)* %out, <16 x double> %x) {
101 %y = call <16 x double> @llvm.floor.v16f64(<16 x double> %x) nounwind readnone
102 store <16 x double> %y, <16 x double> addrspace(1)* %out