Bruno Cardoso Lopes | 53c9588 | 2011-07-13 22:28:55 +0000 | [diff] [blame^] | 1 | ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7-avx -mattr=+avx | FileCheck %s |
| 2 | |
| 3 | ; CHECK: vaddpd |
| 4 | define <4 x double> @addpd256(<4 x double> %y, <4 x double> %x) nounwind uwtable readnone ssp { |
| 5 | entry: |
| 6 | %add.i = fadd <4 x double> %x, %y |
| 7 | ret <4 x double> %add.i |
| 8 | } |
| 9 | |
| 10 | ; CHECK: vaddpd LCP{{.*}}(%rip) |
| 11 | define <4 x double> @addpd256fold(<4 x double> %y) nounwind uwtable readnone ssp { |
| 12 | entry: |
| 13 | %add.i = fadd <4 x double> %y, <double 4.500000e+00, double 3.400000e+00, double 2.300000e+00, double 1.200000e+00> |
| 14 | ret <4 x double> %add.i |
| 15 | } |
| 16 | |
| 17 | ; CHECK: vaddps |
| 18 | define <8 x float> @addps256(<8 x float> %y, <8 x float> %x) nounwind uwtable readnone ssp { |
| 19 | entry: |
| 20 | %add.i = fadd <8 x float> %x, %y |
| 21 | ret <8 x float> %add.i |
| 22 | } |
| 23 | |
| 24 | ; CHECK: vaddps LCP{{.*}}(%rip) |
| 25 | define <8 x float> @addps256fold(<8 x float> %y) nounwind uwtable readnone ssp { |
| 26 | entry: |
| 27 | %add.i = fadd <8 x float> %y, <float 4.500000e+00, float 0x400B333340000000, float 0x4002666660000000, float 0x3FF3333340000000, float 4.500000e+00, float 0x400B333340000000, float 0x4002666660000000, float 0x3FF3333340000000> |
| 28 | ret <8 x float> %add.i |
| 29 | } |
| 30 | |
| 31 | ; CHECK: vsubpd |
| 32 | define <4 x double> @subpd256(<4 x double> %y, <4 x double> %x) nounwind uwtable readnone ssp { |
| 33 | entry: |
| 34 | %sub.i = fsub <4 x double> %x, %y |
| 35 | ret <4 x double> %sub.i |
| 36 | } |
| 37 | |
| 38 | ; CHECK: vsubpd (% |
| 39 | define <4 x double> @subpd256fold(<4 x double> %y, <4 x double>* nocapture %x) nounwind uwtable readonly ssp { |
| 40 | entry: |
| 41 | %tmp2 = load <4 x double>* %x, align 32 |
| 42 | %sub.i = fsub <4 x double> %y, %tmp2 |
| 43 | ret <4 x double> %sub.i |
| 44 | } |
| 45 | |
| 46 | ; CHECK: vsubps |
| 47 | define <8 x float> @subps256(<8 x float> %y, <8 x float> %x) nounwind uwtable readnone ssp { |
| 48 | entry: |
| 49 | %sub.i = fsub <8 x float> %x, %y |
| 50 | ret <8 x float> %sub.i |
| 51 | } |
| 52 | |
| 53 | ; CHECK: vsubps (% |
| 54 | define <8 x float> @subps256fold(<8 x float> %y, <8 x float>* nocapture %x) nounwind uwtable readonly ssp { |
| 55 | entry: |
| 56 | %tmp2 = load <8 x float>* %x, align 32 |
| 57 | %sub.i = fsub <8 x float> %y, %tmp2 |
| 58 | ret <8 x float> %sub.i |
| 59 | } |
| 60 | |
| 61 | ; CHECK: vmulpd |
| 62 | define <4 x double> @mulpd256(<4 x double> %y, <4 x double> %x) nounwind uwtable readnone ssp { |
| 63 | entry: |
| 64 | %mul.i = fmul <4 x double> %x, %y |
| 65 | ret <4 x double> %mul.i |
| 66 | } |
| 67 | |
| 68 | ; CHECK: vmulpd LCP{{.*}}(%rip) |
| 69 | define <4 x double> @mulpd256fold(<4 x double> %y) nounwind uwtable readnone ssp { |
| 70 | entry: |
| 71 | %mul.i = fmul <4 x double> %y, <double 4.500000e+00, double 3.400000e+00, double 2.300000e+00, double 1.200000e+00> |
| 72 | ret <4 x double> %mul.i |
| 73 | } |
| 74 | |
| 75 | ; CHECK: vmulps |
| 76 | define <8 x float> @mulps256(<8 x float> %y, <8 x float> %x) nounwind uwtable readnone ssp { |
| 77 | entry: |
| 78 | %mul.i = fmul <8 x float> %x, %y |
| 79 | ret <8 x float> %mul.i |
| 80 | } |
| 81 | |
| 82 | ; CHECK: vmulps LCP{{.*}}(%rip) |
| 83 | define <8 x float> @mulps256fold(<8 x float> %y) nounwind uwtable readnone ssp { |
| 84 | entry: |
| 85 | %mul.i = fmul <8 x float> %y, <float 4.500000e+00, float 0x400B333340000000, float 0x4002666660000000, float 0x3FF3333340000000, float 4.500000e+00, float 0x400B333340000000, float 0x4002666660000000, float 0x3FF3333340000000> |
| 86 | ret <8 x float> %mul.i |
| 87 | } |
| 88 | |
| 89 | ; CHECK: vdivpd |
| 90 | define <4 x double> @divpd256(<4 x double> %y, <4 x double> %x) nounwind uwtable readnone ssp { |
| 91 | entry: |
| 92 | %div.i = fdiv <4 x double> %x, %y |
| 93 | ret <4 x double> %div.i |
| 94 | } |
| 95 | |
| 96 | ; CHECK: vdivpd LCP{{.*}}(%rip) |
| 97 | define <4 x double> @divpd256fold(<4 x double> %y) nounwind uwtable readnone ssp { |
| 98 | entry: |
| 99 | %div.i = fdiv <4 x double> %y, <double 4.500000e+00, double 3.400000e+00, double 2.300000e+00, double 1.200000e+00> |
| 100 | ret <4 x double> %div.i |
| 101 | } |
| 102 | |
| 103 | ; CHECK: vdivps |
| 104 | define <8 x float> @divps256(<8 x float> %y, <8 x float> %x) nounwind uwtable readnone ssp { |
| 105 | entry: |
| 106 | %div.i = fdiv <8 x float> %x, %y |
| 107 | ret <8 x float> %div.i |
| 108 | } |
| 109 | |
| 110 | ; CHECK: vdivps LCP{{.*}}(%rip) |
| 111 | define <8 x float> @divps256fold(<8 x float> %y) nounwind uwtable readnone ssp { |
| 112 | entry: |
| 113 | %div.i = fdiv <8 x float> %y, <float 4.500000e+00, float 0x400B333340000000, float 0x4002666660000000, float 0x3FF3333340000000, float 4.500000e+00, float 0x400B333340000000, float 0x4002666660000000, float 0x3FF3333340000000> |
| 114 | ret <8 x float> %div.i |
| 115 | } |
| 116 | |