1 ; RUN: llc < %s -mtriple=x86_64-apple-darwin -march=x86 -mcpu=corei7-avx | FileCheck %s 2 3 4 define <2 x double> @floor_v2f64(<2 x double> %p) 5 { 6 ; CHECK: floor_v2f64 7 ; CHECK: vroundpd 8 %t = call <2 x double> @llvm.floor.v2f64(<2 x double> %p) 9 ret <2 x double> %t 10 } 11 declare <2 x double> @llvm.floor.v2f64(<2 x double> %p) 12 13 define <4 x float> @floor_v4f32(<4 x float> %p) 14 { 15 ; CHECK: floor_v4f32 16 ; CHECK: vroundps 17 %t = call <4 x float> @llvm.floor.v4f32(<4 x float> %p) 18 ret <4 x float> %t 19 } 20 declare <4 x float> @llvm.floor.v4f32(<4 x float> %p) 21 22 define <4 x double> @floor_v4f64(<4 x double> %p) 23 { 24 ; CHECK: floor_v4f64 25 ; CHECK: vroundpd 26 %t = call <4 x double> @llvm.floor.v4f64(<4 x double> %p) 27 ret <4 x double> %t 28 } 29 declare <4 x double> @llvm.floor.v4f64(<4 x double> %p) 30 31 define <8 x float> @floor_v8f32(<8 x float> %p) 32 { 33 ; CHECK: floor_v8f32 34 ; CHECK: vroundps 35 %t = call <8 x float> @llvm.floor.v8f32(<8 x float> %p) 36 ret <8 x float> %t 37 } 38 declare <8 x float> @llvm.floor.v8f32(<8 x float> %p) 39 40 define <2 x double> @ceil_v2f64(<2 x double> %p) 41 { 42 ; CHECK: ceil_v2f64 43 ; CHECK: vroundpd 44 %t = call <2 x double> @llvm.ceil.v2f64(<2 x double> %p) 45 ret <2 x double> %t 46 } 47 declare <2 x double> @llvm.ceil.v2f64(<2 x double> %p) 48 49 define <4 x float> @ceil_v4f32(<4 x float> %p) 50 { 51 ; CHECK: ceil_v4f32 52 ; CHECK: vroundps 53 %t = call <4 x float> @llvm.ceil.v4f32(<4 x float> %p) 54 ret <4 x float> %t 55 } 56 declare <4 x float> @llvm.ceil.v4f32(<4 x float> %p) 57 58 define <4 x double> @ceil_v4f64(<4 x double> %p) 59 { 60 ; CHECK: ceil_v4f64 61 ; CHECK: vroundpd 62 %t = call <4 x double> @llvm.ceil.v4f64(<4 x double> %p) 63 ret <4 x double> %t 64 } 65 declare <4 x double> @llvm.ceil.v4f64(<4 x double> %p) 66 67 define <8 x float> @ceil_v8f32(<8 x float> %p) 68 { 69 ; CHECK: ceil_v8f32 70 ; CHECK: vroundps 71 %t = call <8 x float> @llvm.ceil.v8f32(<8 x float> %p) 72 ret <8 x float> %t 73 } 74 declare <8 x float> @llvm.ceil.v8f32(<8 x float> %p) 75 76 define <2 x double> @trunc_v2f64(<2 x double> %p) 77 { 78 ; CHECK: trunc_v2f64 79 ; CHECK: vroundpd 80 %t = call <2 x double> @llvm.trunc.v2f64(<2 x double> %p) 81 ret <2 x double> %t 82 } 83 declare <2 x double> @llvm.trunc.v2f64(<2 x double> %p) 84 85 define <4 x float> @trunc_v4f32(<4 x float> %p) 86 { 87 ; CHECK: trunc_v4f32 88 ; CHECK: vroundps 89 %t = call <4 x float> @llvm.trunc.v4f32(<4 x float> %p) 90 ret <4 x float> %t 91 } 92 declare <4 x float> @llvm.trunc.v4f32(<4 x float> %p) 93 94 define <4 x double> @trunc_v4f64(<4 x double> %p) 95 { 96 ; CHECK: trunc_v4f64 97 ; CHECK: vroundpd 98 %t = call <4 x double> @llvm.trunc.v4f64(<4 x double> %p) 99 ret <4 x double> %t 100 } 101 declare <4 x double> @llvm.trunc.v4f64(<4 x double> %p) 102 103 define <8 x float> @trunc_v8f32(<8 x float> %p) 104 { 105 ; CHECK: trunc_v8f32 106 ; CHECK: vroundps 107 %t = call <8 x float> @llvm.trunc.v8f32(<8 x float> %p) 108 ret <8 x float> %t 109 } 110 declare <8 x float> @llvm.trunc.v8f32(<8 x float> %p) 111 112 define <2 x double> @rint_v2f64(<2 x double> %p) 113 { 114 ; CHECK: rint_v2f64 115 ; CHECK: vroundpd 116 %t = call <2 x double> @llvm.rint.v2f64(<2 x double> %p) 117 ret <2 x double> %t 118 } 119 declare <2 x double> @llvm.rint.v2f64(<2 x double> %p) 120 121 define <4 x float> @rint_v4f32(<4 x float> %p) 122 { 123 ; CHECK: rint_v4f32 124 ; CHECK: vroundps 125 %t = call <4 x float> @llvm.rint.v4f32(<4 x float> %p) 126 ret <4 x float> %t 127 } 128 declare <4 x float> @llvm.rint.v4f32(<4 x float> %p) 129 130 define <4 x double> @rint_v4f64(<4 x double> %p) 131 { 132 ; CHECK: rint_v4f64 133 ; CHECK: vroundpd 134 %t = call <4 x double> @llvm.rint.v4f64(<4 x double> %p) 135 ret <4 x double> %t 136 } 137 declare <4 x double> @llvm.rint.v4f64(<4 x double> %p) 138 139 define <8 x float> @rint_v8f32(<8 x float> %p) 140 { 141 ; CHECK: rint_v8f32 142 ; CHECK: vroundps 143 %t = call <8 x float> @llvm.rint.v8f32(<8 x float> %p) 144 ret <8 x float> %t 145 } 146 declare <8 x float> @llvm.rint.v8f32(<8 x float> %p) 147 148 define <2 x double> @nearbyint_v2f64(<2 x double> %p) 149 { 150 ; CHECK: nearbyint_v2f64 151 ; CHECK: vroundpd 152 %t = call <2 x double> @llvm.nearbyint.v2f64(<2 x double> %p) 153 ret <2 x double> %t 154 } 155 declare <2 x double> @llvm.nearbyint.v2f64(<2 x double> %p) 156 157 define <4 x float> @nearbyint_v4f32(<4 x float> %p) 158 { 159 ; CHECK: nearbyint_v4f32 160 ; CHECK: vroundps 161 %t = call <4 x float> @llvm.nearbyint.v4f32(<4 x float> %p) 162 ret <4 x float> %t 163 } 164 declare <4 x float> @llvm.nearbyint.v4f32(<4 x float> %p) 165 166 define <4 x double> @nearbyint_v4f64(<4 x double> %p) 167 { 168 ; CHECK: nearbyint_v4f64 169 ; CHECK: vroundpd 170 %t = call <4 x double> @llvm.nearbyint.v4f64(<4 x double> %p) 171 ret <4 x double> %t 172 } 173 declare <4 x double> @llvm.nearbyint.v4f64(<4 x double> %p) 174 175 define <8 x float> @nearbyint_v8f32(<8 x float> %p) 176 { 177 ; CHECK: nearbyint_v8f32 178 ; CHECK: vroundps 179 %t = call <8 x float> @llvm.nearbyint.v8f32(<8 x float> %p) 180 ret <8 x float> %t 181 } 182 declare <8 x float> @llvm.nearbyint.v8f32(<8 x float> %p) 183