Cameron McInally | c5764cb | 2015-02-16 22:15:42 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=knl --show-mc-encoding| FileCheck %s |
| 2 | |
| 3 | define <16 x float> @floor_v16f32(<16 x float> %a) { |
| 4 | ; CHECK-LABEL: floor_v16f32 |
| 5 | ; CHECK: vrndscaleps $1, {{.*}}encoding: [0x62,0xf3,0x7d,0x48,0x08,0xc0,0x01] |
| 6 | %res = call <16 x float> @llvm.floor.v16f32(<16 x float> %a) |
| 7 | ret <16 x float> %res |
| 8 | } |
| 9 | declare <16 x float> @llvm.floor.v16f32(<16 x float> %p) |
| 10 | |
| 11 | define <8 x double> @floor_v8f64(<8 x double> %a) { |
| 12 | ; CHECK-LABEL: floor_v8f64 |
| 13 | ; CHECK: vrndscalepd $1, {{.*}}encoding: [0x62,0xf3,0xfd,0x48,0x09,0xc0,0x01] |
| 14 | %res = call <8 x double> @llvm.floor.v8f64(<8 x double> %a) |
| 15 | ret <8 x double> %res |
| 16 | } |
| 17 | declare <8 x double> @llvm.floor.v8f64(<8 x double> %p) |
| 18 | |
| 19 | define <16 x float> @ceil_v16f32(<16 x float> %a) { |
| 20 | ; CHECK-LABEL: ceil_v16f32 |
| 21 | ; CHECK: vrndscaleps $2, {{.*}}encoding: [0x62,0xf3,0x7d,0x48,0x08,0xc0,0x02] |
| 22 | %res = call <16 x float> @llvm.ceil.v16f32(<16 x float> %a) |
| 23 | ret <16 x float> %res |
| 24 | } |
| 25 | declare <16 x float> @llvm.ceil.v16f32(<16 x float> %p) |
| 26 | |
| 27 | define <8 x double> @ceil_v8f64(<8 x double> %a) { |
| 28 | ; CHECK-LABEL: ceil_v8f64 |
| 29 | ; CHECK: vrndscalepd $2, {{.*}}encoding: [0x62,0xf3,0xfd,0x48,0x09,0xc0,0x02] |
| 30 | %res = call <8 x double> @llvm.ceil.v8f64(<8 x double> %a) |
| 31 | ret <8 x double> %res |
| 32 | } |
| 33 | declare <8 x double> @llvm.ceil.v8f64(<8 x double> %p) |
| 34 | |
| 35 | define <16 x float> @trunc_v16f32(<16 x float> %a) { |
| 36 | ; CHECK-LABEL: trunc_v16f32 |
| 37 | ; CHECK: vrndscaleps $3, {{.*}}encoding: [0x62,0xf3,0x7d,0x48,0x08,0xc0,0x03] |
| 38 | %res = call <16 x float> @llvm.trunc.v16f32(<16 x float> %a) |
| 39 | ret <16 x float> %res |
| 40 | } |
| 41 | declare <16 x float> @llvm.trunc.v16f32(<16 x float> %p) |
| 42 | |
| 43 | define <8 x double> @trunc_v8f64(<8 x double> %a) { |
| 44 | ; CHECK-LABEL: trunc_v8f64 |
| 45 | ; CHECK: vrndscalepd $3, {{.*}}encoding: [0x62,0xf3,0xfd,0x48,0x09,0xc0,0x03] |
| 46 | %res = call <8 x double> @llvm.trunc.v8f64(<8 x double> %a) |
| 47 | ret <8 x double> %res |
| 48 | } |
| 49 | declare <8 x double> @llvm.trunc.v8f64(<8 x double> %p) |
| 50 | |
| 51 | define <16 x float> @rint_v16f32(<16 x float> %a) { |
| 52 | ; CHECK-LABEL: rint_v16f32 |
| 53 | ; CHECK: vrndscaleps $4, {{.*}}encoding: [0x62,0xf3,0x7d,0x48,0x08,0xc0,0x04] |
| 54 | %res = call <16 x float> @llvm.rint.v16f32(<16 x float> %a) |
| 55 | ret <16 x float> %res |
| 56 | } |
| 57 | declare <16 x float> @llvm.rint.v16f32(<16 x float> %p) |
| 58 | |
| 59 | define <8 x double> @rint_v8f64(<8 x double> %a) { |
| 60 | ; CHECK-LABEL: rint_v8f64 |
| 61 | ; CHECK: vrndscalepd $4, {{.*}}encoding: [0x62,0xf3,0xfd,0x48,0x09,0xc0,0x04] |
| 62 | %res = call <8 x double> @llvm.rint.v8f64(<8 x double> %a) |
| 63 | ret <8 x double> %res |
| 64 | } |
| 65 | declare <8 x double> @llvm.rint.v8f64(<8 x double> %p) |
| 66 | |
| 67 | define <16 x float> @nearbyint_v16f32(<16 x float> %a) { |
| 68 | ; CHECK-LABEL: nearbyint_v16f32 |
| 69 | ; CHECK: vrndscaleps $12, {{.*}}encoding: [0x62,0xf3,0x7d,0x48,0x08,0xc0,0x0c] |
| 70 | %res = call <16 x float> @llvm.nearbyint.v16f32(<16 x float> %a) |
| 71 | ret <16 x float> %res |
| 72 | } |
| 73 | declare <16 x float> @llvm.nearbyint.v16f32(<16 x float> %p) |
| 74 | |
| 75 | define <8 x double> @nearbyint_v8f64(<8 x double> %a) { |
| 76 | ; CHECK-LABEL: nearbyint_v8f64 |
| 77 | ; CHECK: vrndscalepd $12, {{.*}}encoding: [0x62,0xf3,0xfd,0x48,0x09,0xc0,0x0c] |
| 78 | %res = call <8 x double> @llvm.nearbyint.v8f64(<8 x double> %a) |
| 79 | ret <8 x double> %res |
| 80 | } |
| 81 | declare <8 x double> @llvm.nearbyint.v8f64(<8 x double> %p) |