| Chandler Carruth | eb206aa | 2015-02-20 03:59:35 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s -mcpu=x86-64 -mattr=+avx512f | FileCheck %s --check-prefix=ALL --check-prefix=AVX512 --check-prefix=AVX512F |
| 2 | ; RUN: llc < %s -mcpu=x86-64 -mattr=+avx512bw | FileCheck %s --check-prefix=ALL --check-prefix=AVX512 --check-prefix=AVX512BW |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 3 | |
| 4 | target triple = "x86_64-unknown-unknown" |
| 5 | |
| 6 | define <8 x double> @shuffle_v8f64_00000000(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 7 | ; ALL-LABEL: shuffle_v8f64_00000000: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 8 | ; ALL: # BB#0: |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 9 | ; ALL-NEXT: vbroadcastsd %xmm0, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 10 | ; ALL-NEXT: retq |
| 11 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0> |
| 12 | ret <8 x double> %shuffle |
| 13 | } |
| 14 | |
| 15 | define <8 x double> @shuffle_v8f64_00000010(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 16 | ; ALL-LABEL: shuffle_v8f64_00000010: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 17 | ; ALL: # BB#0: |
| Chandler Carruth | b9d3fa1 | 2014-10-01 00:41:21 +0000 | [diff] [blame] | 18 | ; ALL-NEXT: vbroadcastsd %xmm0, %ymm1 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 19 | ; ALL-NEXT: vpermpd {{.*#+}} ymm0 = ymm0[0,0,1,0] |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 20 | ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm1, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 21 | ; ALL-NEXT: retq |
| 22 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0> |
| 23 | ret <8 x double> %shuffle |
| 24 | } |
| 25 | |
| 26 | define <8 x double> @shuffle_v8f64_00000200(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 27 | ; ALL-LABEL: shuffle_v8f64_00000200: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 28 | ; ALL: # BB#0: |
| Chandler Carruth | b9d3fa1 | 2014-10-01 00:41:21 +0000 | [diff] [blame] | 29 | ; ALL-NEXT: vbroadcastsd %xmm0, %ymm1 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 30 | ; ALL-NEXT: vpermpd {{.*#+}} ymm0 = ymm0[0,2,0,0] |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 31 | ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm1, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 32 | ; ALL-NEXT: retq |
| 33 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0> |
| 34 | ret <8 x double> %shuffle |
| 35 | } |
| 36 | |
| 37 | define <8 x double> @shuffle_v8f64_00003000(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 38 | ; ALL-LABEL: shuffle_v8f64_00003000: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 39 | ; ALL: # BB#0: |
| Chandler Carruth | b9d3fa1 | 2014-10-01 00:41:21 +0000 | [diff] [blame] | 40 | ; ALL-NEXT: vbroadcastsd %xmm0, %ymm1 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 41 | ; ALL-NEXT: vpermpd {{.*#+}} ymm0 = ymm0[3,0,0,0] |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 42 | ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm1, %zmm0 |
| 43 | ; ALL-NEXT: retq |
| 44 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 0, i32 0, i32 0, i32 3, i32 0, i32 0, i32 0> |
| 45 | ret <8 x double> %shuffle |
| 46 | } |
| 47 | |
| 48 | define <8 x double> @shuffle_v8f64_00040000(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 49 | ; ALL-LABEL: shuffle_v8f64_00040000: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 50 | ; ALL: # BB#0: |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 51 | ; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm1 |
| Chandler Carruth | b9d3fa1 | 2014-10-01 00:41:21 +0000 | [diff] [blame] | 52 | ; ALL-NEXT: vbroadcastsd %xmm1, %ymm1 |
| 53 | ; ALL-NEXT: vbroadcastsd %xmm0, %ymm0 |
| 54 | ; ALL-NEXT: vblendpd {{.*#+}} ymm1 = ymm0[0,1,2],ymm1[3] |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 55 | ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm1, %zmm0 |
| 56 | ; ALL-NEXT: retq |
| 57 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 0, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0> |
| 58 | ret <8 x double> %shuffle |
| 59 | } |
| 60 | |
| 61 | define <8 x double> @shuffle_v8f64_00500000(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 62 | ; ALL-LABEL: shuffle_v8f64_00500000: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 63 | ; ALL: # BB#0: |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 64 | ; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm1 |
| Chandler Carruth | bf0fb06 | 2015-02-15 12:42:15 +0000 | [diff] [blame] | 65 | ; ALL-NEXT: vblendpd {{.*#+}} ymm1 = ymm0[0],ymm1[1],ymm0[2,3] |
| 66 | ; ALL-NEXT: vpermpd {{.*#+}} ymm1 = ymm1[0,0,1,0] |
| Chandler Carruth | b9d3fa1 | 2014-10-01 00:41:21 +0000 | [diff] [blame] | 67 | ; ALL-NEXT: vbroadcastsd %xmm0, %ymm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 68 | ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm1, %zmm0 |
| 69 | ; ALL-NEXT: retq |
| 70 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 0, i32 5, i32 0, i32 0, i32 0, i32 0, i32 0> |
| 71 | ret <8 x double> %shuffle |
| 72 | } |
| 73 | |
| 74 | define <8 x double> @shuffle_v8f64_06000000(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 75 | ; ALL-LABEL: shuffle_v8f64_06000000: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 76 | ; ALL: # BB#0: |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 77 | ; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm1 |
| Chandler Carruth | bf0fb06 | 2015-02-15 12:42:15 +0000 | [diff] [blame] | 78 | ; ALL-NEXT: vblendpd {{.*#+}} ymm1 = ymm0[0,1],ymm1[2],ymm0[3] |
| 79 | ; ALL-NEXT: vpermpd {{.*#+}} ymm1 = ymm1[0,2,0,0] |
| Chandler Carruth | b9d3fa1 | 2014-10-01 00:41:21 +0000 | [diff] [blame] | 80 | ; ALL-NEXT: vbroadcastsd %xmm0, %ymm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 81 | ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm1, %zmm0 |
| 82 | ; ALL-NEXT: retq |
| 83 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 6, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0> |
| 84 | ret <8 x double> %shuffle |
| 85 | } |
| 86 | |
| 87 | define <8 x double> @shuffle_v8f64_70000000(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 88 | ; ALL-LABEL: shuffle_v8f64_70000000: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 89 | ; ALL: # BB#0: |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 90 | ; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm1 |
| Chandler Carruth | bf0fb06 | 2015-02-15 12:42:15 +0000 | [diff] [blame] | 91 | ; ALL-NEXT: vblendpd {{.*#+}} ymm1 = ymm0[0,1,2],ymm1[3] |
| 92 | ; ALL-NEXT: vpermpd {{.*#+}} ymm1 = ymm1[3,0,0,0] |
| Chandler Carruth | b9d3fa1 | 2014-10-01 00:41:21 +0000 | [diff] [blame] | 93 | ; ALL-NEXT: vbroadcastsd %xmm0, %ymm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 94 | ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm1, %zmm0 |
| 95 | ; ALL-NEXT: retq |
| 96 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 7, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0> |
| 97 | ret <8 x double> %shuffle |
| 98 | } |
| 99 | |
| 100 | define <8 x double> @shuffle_v8f64_01014545(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 101 | ; ALL-LABEL: shuffle_v8f64_01014545: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 102 | ; ALL: # BB#0: |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 103 | ; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm1 |
| Chandler Carruth | 9f4d9fa | 2014-10-05 11:41:36 +0000 | [diff] [blame] | 104 | ; ALL-NEXT: vinsertf128 $1, %xmm1, %ymm1, %ymm1 |
| 105 | ; ALL-NEXT: vinsertf128 $1, %xmm0, %ymm0, %ymm0 |
| 106 | ; ALL-NEXT: vinsertf64x4 $1, %ymm1, %zmm0, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 107 | ; ALL-NEXT: retq |
| 108 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 1, i32 0, i32 1, i32 4, i32 5, i32 4, i32 5> |
| 109 | ret <8 x double> %shuffle |
| 110 | } |
| 111 | |
| 112 | define <8 x double> @shuffle_v8f64_00112233(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 113 | ; ALL-LABEL: shuffle_v8f64_00112233: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 114 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 115 | ; ALL-NEXT: vpermpd {{.*#+}} ymm1 = ymm0[0,0,1,1] |
| 116 | ; ALL-NEXT: vpermpd {{.*#+}} ymm0 = ymm0[2,2,3,3] |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 117 | ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm1, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 118 | ; ALL-NEXT: retq |
| 119 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 0, i32 1, i32 1, i32 2, i32 2, i32 3, i32 3> |
| 120 | ret <8 x double> %shuffle |
| 121 | } |
| 122 | |
| 123 | define <8 x double> @shuffle_v8f64_00001111(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 124 | ; ALL-LABEL: shuffle_v8f64_00001111: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 125 | ; ALL: # BB#0: |
| Chandler Carruth | b9d3fa1 | 2014-10-01 00:41:21 +0000 | [diff] [blame] | 126 | ; ALL-NEXT: vbroadcastsd %xmm0, %ymm1 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 127 | ; ALL-NEXT: vpermpd {{.*#+}} ymm0 = ymm0[1,1,1,1] |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 128 | ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm1, %zmm0 |
| 129 | ; ALL-NEXT: retq |
| 130 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1> |
| 131 | ret <8 x double> %shuffle |
| 132 | } |
| 133 | |
| 134 | define <8 x double> @shuffle_v8f64_81a3c5e7(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 135 | ; ALL-LABEL: shuffle_v8f64_81a3c5e7: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 136 | ; ALL: # BB#0: |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 137 | ; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm2 |
| 138 | ; ALL-NEXT: vextractf64x4 $1, %zmm1, %ymm3 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 139 | ; ALL-NEXT: vblendpd {{.*#+}} ymm2 = ymm3[0],ymm2[1],ymm3[2],ymm2[3] |
| 140 | ; ALL-NEXT: vblendpd {{.*#+}} ymm0 = ymm1[0],ymm0[1],ymm1[2],ymm0[3] |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 141 | ; ALL-NEXT: vinsertf64x4 $1, %ymm2, %zmm0, %zmm0 |
| 142 | ; ALL-NEXT: retq |
| 143 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 8, i32 1, i32 10, i32 3, i32 12, i32 5, i32 14, i32 7> |
| 144 | ret <8 x double> %shuffle |
| 145 | } |
| 146 | |
| 147 | define <8 x double> @shuffle_v8f64_08080808(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 148 | ; ALL-LABEL: shuffle_v8f64_08080808: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 149 | ; ALL: # BB#0: |
| Chandler Carruth | 9f4d9fa | 2014-10-05 11:41:36 +0000 | [diff] [blame] | 150 | ; ALL-NEXT: vinsertf128 $1, %xmm0, %ymm0, %ymm0 |
| Chandler Carruth | b9d3fa1 | 2014-10-01 00:41:21 +0000 | [diff] [blame] | 151 | ; ALL-NEXT: vbroadcastsd %xmm1, %ymm1 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 152 | ; ALL-NEXT: vblendpd {{.*#+}} ymm0 = ymm0[0],ymm1[1],ymm0[2],ymm1[3] |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 153 | ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm0, %zmm0 |
| 154 | ; ALL-NEXT: retq |
| 155 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 8, i32 0, i32 8, i32 0, i32 8, i32 0, i32 8> |
| 156 | ret <8 x double> %shuffle |
| 157 | } |
| 158 | |
| 159 | define <8 x double> @shuffle_v8f64_08084c4c(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 160 | ; ALL-LABEL: shuffle_v8f64_08084c4c: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 161 | ; ALL: # BB#0: |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 162 | ; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm2 |
| Chandler Carruth | 9f4d9fa | 2014-10-05 11:41:36 +0000 | [diff] [blame] | 163 | ; ALL-NEXT: vinsertf128 $1, %xmm2, %ymm2, %ymm2 |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 164 | ; ALL-NEXT: vextractf64x4 $1, %zmm1, %ymm3 |
| Chandler Carruth | b9d3fa1 | 2014-10-01 00:41:21 +0000 | [diff] [blame] | 165 | ; ALL-NEXT: vbroadcastsd %xmm3, %ymm3 |
| Chandler Carruth | 9f4d9fa | 2014-10-05 11:41:36 +0000 | [diff] [blame] | 166 | ; ALL-NEXT: vblendpd {{.*#+}} ymm2 = ymm2[0],ymm3[1],ymm2[2],ymm3[3] |
| 167 | ; ALL-NEXT: vinsertf128 $1, %xmm0, %ymm0, %ymm0 |
| Chandler Carruth | b9d3fa1 | 2014-10-01 00:41:21 +0000 | [diff] [blame] | 168 | ; ALL-NEXT: vbroadcastsd %xmm1, %ymm1 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 169 | ; ALL-NEXT: vblendpd {{.*#+}} ymm0 = ymm0[0],ymm1[1],ymm0[2],ymm1[3] |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 170 | ; ALL-NEXT: vinsertf64x4 $1, %ymm2, %zmm0, %zmm0 |
| 171 | ; ALL-NEXT: retq |
| 172 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 8, i32 0, i32 8, i32 4, i32 12, i32 4, i32 12> |
| 173 | ret <8 x double> %shuffle |
| 174 | } |
| 175 | |
| 176 | define <8 x double> @shuffle_v8f64_8823cc67(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 177 | ; ALL-LABEL: shuffle_v8f64_8823cc67: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 178 | ; ALL: # BB#0: |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 179 | ; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm2 |
| 180 | ; ALL-NEXT: vextractf64x4 $1, %zmm1, %ymm3 |
| Chandler Carruth | b9d3fa1 | 2014-10-01 00:41:21 +0000 | [diff] [blame] | 181 | ; ALL-NEXT: vbroadcastsd %xmm3, %ymm3 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 182 | ; ALL-NEXT: vblendpd {{.*#+}} ymm2 = ymm3[0,1],ymm2[2,3] |
| Chandler Carruth | b9d3fa1 | 2014-10-01 00:41:21 +0000 | [diff] [blame] | 183 | ; ALL-NEXT: vbroadcastsd %xmm1, %ymm1 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 184 | ; ALL-NEXT: vblendpd {{.*#+}} ymm0 = ymm1[0,1],ymm0[2,3] |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 185 | ; ALL-NEXT: vinsertf64x4 $1, %ymm2, %zmm0, %zmm0 |
| 186 | ; ALL-NEXT: retq |
| 187 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 8, i32 8, i32 2, i32 3, i32 12, i32 12, i32 6, i32 7> |
| 188 | ret <8 x double> %shuffle |
| 189 | } |
| 190 | |
| 191 | define <8 x double> @shuffle_v8f64_9832dc76(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 192 | ; ALL-LABEL: shuffle_v8f64_9832dc76: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 193 | ; ALL: # BB#0: |
| Chandler Carruth | ce5a26b | 2014-11-21 14:53:03 +0000 | [diff] [blame] | 194 | ; ALL-NEXT: vblendpd {{.*#+}} ymm2 = ymm1[0,1],ymm0[2,3] |
| 195 | ; ALL-NEXT: vpermilpd {{.*#+}} ymm2 = ymm2[1,0,3,2] |
| 196 | ; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm0 |
| 197 | ; ALL-NEXT: vextractf64x4 $1, %zmm1, %ymm1 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 198 | ; ALL-NEXT: vblendpd {{.*#+}} ymm0 = ymm1[0,1],ymm0[2,3] |
| Chandler Carruth | ce5a26b | 2014-11-21 14:53:03 +0000 | [diff] [blame] | 199 | ; ALL-NEXT: vpermilpd {{.*#+}} ymm0 = ymm0[1,0,3,2] |
| 200 | ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm2, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 201 | ; ALL-NEXT: retq |
| 202 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 9, i32 8, i32 3, i32 2, i32 13, i32 12, i32 7, i32 6> |
| 203 | ret <8 x double> %shuffle |
| 204 | } |
| 205 | |
| 206 | define <8 x double> @shuffle_v8f64_9810dc54(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 207 | ; ALL-LABEL: shuffle_v8f64_9810dc54: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 208 | ; ALL: # BB#0: |
| Chandler Carruth | d2b19bc | 2014-11-21 13:56:05 +0000 | [diff] [blame] | 209 | ; ALL-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm2 |
| 210 | ; ALL-NEXT: vpermilpd {{.*#+}} ymm2 = ymm2[1,0,3,2] |
| 211 | ; ALL-NEXT: vextractf64x4 $1, %zmm1, %ymm1 |
| 212 | ; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm0 |
| 213 | ; ALL-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0 |
| 214 | ; ALL-NEXT: vpermilpd {{.*#+}} ymm0 = ymm0[1,0,3,2] |
| 215 | ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm2, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 216 | ; ALL-NEXT: retq |
| 217 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 9, i32 8, i32 1, i32 0, i32 13, i32 12, i32 5, i32 4> |
| 218 | ret <8 x double> %shuffle |
| 219 | } |
| 220 | |
| 221 | define <8 x double> @shuffle_v8f64_08194c5d(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 222 | ; ALL-LABEL: shuffle_v8f64_08194c5d: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 223 | ; ALL: # BB#0: |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 224 | ; ALL-NEXT: vextractf64x4 $1, %zmm1, %ymm2 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 225 | ; ALL-NEXT: vpermpd {{.*#+}} ymm2 = ymm2[0,0,2,1] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 226 | ; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm3 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 227 | ; ALL-NEXT: vpermpd {{.*#+}} ymm3 = ymm3[0,1,1,3] |
| 228 | ; ALL-NEXT: vblendpd {{.*#+}} ymm2 = ymm3[0],ymm2[1],ymm3[2],ymm2[3] |
| 229 | ; ALL-NEXT: vpermpd {{.*#+}} ymm1 = ymm1[0,0,2,1] |
| 230 | ; ALL-NEXT: vpermpd {{.*#+}} ymm0 = ymm0[0,1,1,3] |
| 231 | ; ALL-NEXT: vblendpd {{.*#+}} ymm0 = ymm0[0],ymm1[1],ymm0[2],ymm1[3] |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 232 | ; ALL-NEXT: vinsertf64x4 $1, %ymm2, %zmm0, %zmm0 |
| 233 | ; ALL-NEXT: retq |
| 234 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 8, i32 1, i32 9, i32 4, i32 12, i32 5, i32 13> |
| 235 | ret <8 x double> %shuffle |
| 236 | } |
| 237 | |
| 238 | define <8 x double> @shuffle_v8f64_2a3b6e7f(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 239 | ; ALL-LABEL: shuffle_v8f64_2a3b6e7f: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 240 | ; ALL: # BB#0: |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 241 | ; ALL-NEXT: vextractf64x4 $1, %zmm1, %ymm2 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 242 | ; ALL-NEXT: vpermpd {{.*#+}} ymm2 = ymm2[0,2,2,3] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 243 | ; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm3 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 244 | ; ALL-NEXT: vpermpd {{.*#+}} ymm3 = ymm3[2,1,3,3] |
| 245 | ; ALL-NEXT: vblendpd {{.*#+}} ymm2 = ymm3[0],ymm2[1],ymm3[2],ymm2[3] |
| 246 | ; ALL-NEXT: vpermpd {{.*#+}} ymm1 = ymm1[0,2,2,3] |
| 247 | ; ALL-NEXT: vpermpd {{.*#+}} ymm0 = ymm0[2,1,3,3] |
| 248 | ; ALL-NEXT: vblendpd {{.*#+}} ymm0 = ymm0[0],ymm1[1],ymm0[2],ymm1[3] |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 249 | ; ALL-NEXT: vinsertf64x4 $1, %ymm2, %zmm0, %zmm0 |
| 250 | ; ALL-NEXT: retq |
| 251 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 2, i32 10, i32 3, i32 11, i32 6, i32 14, i32 7, i32 15> |
| 252 | ret <8 x double> %shuffle |
| 253 | } |
| 254 | |
| 255 | define <8 x double> @shuffle_v8f64_08192a3b(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 256 | ; ALL-LABEL: shuffle_v8f64_08192a3b: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 257 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 258 | ; ALL-NEXT: vpermpd {{.*#+}} ymm2 = ymm1[0,2,2,3] |
| 259 | ; ALL-NEXT: vpermpd {{.*#+}} ymm3 = ymm0[2,1,3,3] |
| 260 | ; ALL-NEXT: vblendpd {{.*#+}} ymm2 = ymm3[0],ymm2[1],ymm3[2],ymm2[3] |
| 261 | ; ALL-NEXT: vpermpd {{.*#+}} ymm1 = ymm1[0,0,2,1] |
| 262 | ; ALL-NEXT: vpermpd {{.*#+}} ymm0 = ymm0[0,1,1,3] |
| 263 | ; ALL-NEXT: vblendpd {{.*#+}} ymm0 = ymm0[0],ymm1[1],ymm0[2],ymm1[3] |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 264 | ; ALL-NEXT: vinsertf64x4 $1, %ymm2, %zmm0, %zmm0 |
| 265 | ; ALL-NEXT: retq |
| 266 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 8, i32 1, i32 9, i32 2, i32 10, i32 3, i32 11> |
| 267 | ret <8 x double> %shuffle |
| 268 | } |
| 269 | |
| 270 | define <8 x double> @shuffle_v8f64_08991abb(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 271 | ; ALL-LABEL: shuffle_v8f64_08991abb: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 272 | ; ALL: # BB#0: |
| Chandler Carruth | bf0fb06 | 2015-02-15 12:42:15 +0000 | [diff] [blame] | 273 | ; ALL-NEXT: vpermpd {{.*#+}} ymm2 = ymm1[0,0,1,1] |
| 274 | ; ALL-NEXT: vblendpd {{.*#+}} ymm2 = ymm0[0],ymm2[1,2,3] |
| 275 | ; ALL-NEXT: vblendpd {{.*#+}} ymm0 = ymm1[0],ymm0[1],ymm1[2,3] |
| 276 | ; ALL-NEXT: vpermpd {{.*#+}} ymm0 = ymm0[1,2,3,3] |
| 277 | ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm2, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 278 | ; ALL-NEXT: retq |
| 279 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 8, i32 9, i32 9, i32 1, i32 10, i32 11, i32 11> |
| 280 | ret <8 x double> %shuffle |
| 281 | } |
| 282 | |
| 283 | define <8 x double> @shuffle_v8f64_091b2d3f(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 284 | ; ALL-LABEL: shuffle_v8f64_091b2d3f: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 285 | ; ALL: # BB#0: |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 286 | ; ALL-NEXT: vextractf64x4 $1, %zmm1, %ymm2 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 287 | ; ALL-NEXT: vpermpd {{.*#+}} ymm3 = ymm0[2,1,3,3] |
| 288 | ; ALL-NEXT: vblendpd {{.*#+}} ymm2 = ymm3[0],ymm2[1],ymm3[2],ymm2[3] |
| 289 | ; ALL-NEXT: vpermpd {{.*#+}} ymm0 = ymm0[0,1,1,3] |
| 290 | ; ALL-NEXT: vblendpd {{.*#+}} ymm0 = ymm0[0],ymm1[1],ymm0[2],ymm1[3] |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 291 | ; ALL-NEXT: vinsertf64x4 $1, %ymm2, %zmm0, %zmm0 |
| 292 | ; ALL-NEXT: retq |
| 293 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 9, i32 1, i32 11, i32 2, i32 13, i32 3, i32 15> |
| 294 | ret <8 x double> %shuffle |
| 295 | } |
| 296 | |
| 297 | define <8 x double> @shuffle_v8f64_09ab1def(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 298 | ; ALL-LABEL: shuffle_v8f64_09ab1def: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 299 | ; ALL: # BB#0: |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 300 | ; ALL-NEXT: vextractf64x4 $1, %zmm1, %ymm2 |
| Chandler Carruth | f3e8806 | 2014-10-03 22:43:17 +0000 | [diff] [blame] | 301 | ; ALL-NEXT: vpermilpd {{.*#+}} ymm3 = ymm0[1,0,2,2] |
| 302 | ; ALL-NEXT: vblendpd {{.*#+}} ymm2 = ymm3[0],ymm2[1,2,3] |
| 303 | ; ALL-NEXT: vblendpd {{.*#+}} ymm0 = ymm0[0],ymm1[1,2,3] |
| 304 | ; ALL-NEXT: vinsertf64x4 $1, %ymm2, %zmm0, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 305 | ; ALL-NEXT: retq |
| 306 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 9, i32 10, i32 11, i32 1, i32 13, i32 14, i32 15> |
| 307 | ret <8 x double> %shuffle |
| 308 | } |
| 309 | |
| 310 | define <8 x double> @shuffle_v8f64_00014445(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 311 | ; ALL-LABEL: shuffle_v8f64_00014445: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 312 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 313 | ; ALL-NEXT: vpermpd {{.*#+}} ymm1 = ymm0[0,0,0,1] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 314 | ; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 315 | ; ALL-NEXT: vpermpd {{.*#+}} ymm0 = ymm0[0,0,0,1] |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 316 | ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm1, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 317 | ; ALL-NEXT: retq |
| 318 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 0, i32 0, i32 1, i32 4, i32 4, i32 4, i32 5> |
| 319 | ret <8 x double> %shuffle |
| 320 | } |
| 321 | |
| 322 | define <8 x double> @shuffle_v8f64_00204464(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 323 | ; ALL-LABEL: shuffle_v8f64_00204464: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 324 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 325 | ; ALL-NEXT: vpermpd {{.*#+}} ymm1 = ymm0[0,0,2,0] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 326 | ; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 327 | ; ALL-NEXT: vpermpd {{.*#+}} ymm0 = ymm0[0,0,2,0] |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 328 | ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm1, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 329 | ; ALL-NEXT: retq |
| 330 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 0, i32 2, i32 0, i32 4, i32 4, i32 6, i32 4> |
| 331 | ret <8 x double> %shuffle |
| 332 | } |
| 333 | |
| 334 | define <8 x double> @shuffle_v8f64_03004744(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 335 | ; ALL-LABEL: shuffle_v8f64_03004744: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 336 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 337 | ; ALL-NEXT: vpermpd {{.*#+}} ymm1 = ymm0[0,3,0,0] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 338 | ; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 339 | ; ALL-NEXT: vpermpd {{.*#+}} ymm0 = ymm0[0,3,0,0] |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 340 | ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm1, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 341 | ; ALL-NEXT: retq |
| 342 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 3, i32 0, i32 0, i32 4, i32 7, i32 4, i32 4> |
| 343 | ret <8 x double> %shuffle |
| 344 | } |
| 345 | |
| 346 | define <8 x double> @shuffle_v8f64_10005444(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 347 | ; ALL-LABEL: shuffle_v8f64_10005444: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 348 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 349 | ; ALL-NEXT: vpermpd {{.*#+}} ymm1 = ymm0[1,0,0,0] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 350 | ; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 351 | ; ALL-NEXT: vpermpd {{.*#+}} ymm0 = ymm0[1,0,0,0] |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 352 | ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm1, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 353 | ; ALL-NEXT: retq |
| 354 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 1, i32 0, i32 0, i32 0, i32 5, i32 4, i32 4, i32 4> |
| 355 | ret <8 x double> %shuffle |
| 356 | } |
| 357 | |
| 358 | define <8 x double> @shuffle_v8f64_22006644(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 359 | ; ALL-LABEL: shuffle_v8f64_22006644: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 360 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 361 | ; ALL-NEXT: vpermpd {{.*#+}} ymm1 = ymm0[2,2,0,0] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 362 | ; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 363 | ; ALL-NEXT: vpermpd {{.*#+}} ymm0 = ymm0[2,2,0,0] |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 364 | ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm1, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 365 | ; ALL-NEXT: retq |
| 366 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 2, i32 2, i32 0, i32 0, i32 6, i32 6, i32 4, i32 4> |
| 367 | ret <8 x double> %shuffle |
| 368 | } |
| 369 | |
| 370 | define <8 x double> @shuffle_v8f64_33307774(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 371 | ; ALL-LABEL: shuffle_v8f64_33307774: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 372 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 373 | ; ALL-NEXT: vpermpd {{.*#+}} ymm1 = ymm0[3,3,3,0] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 374 | ; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 375 | ; ALL-NEXT: vpermpd {{.*#+}} ymm0 = ymm0[3,3,3,0] |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 376 | ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm1, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 377 | ; ALL-NEXT: retq |
| 378 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 3, i32 3, i32 3, i32 0, i32 7, i32 7, i32 7, i32 4> |
| 379 | ret <8 x double> %shuffle |
| 380 | } |
| 381 | |
| 382 | define <8 x double> @shuffle_v8f64_32107654(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 383 | ; ALL-LABEL: shuffle_v8f64_32107654: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 384 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 385 | ; ALL-NEXT: vpermpd {{.*#+}} ymm1 = ymm0[3,2,1,0] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 386 | ; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 387 | ; ALL-NEXT: vpermpd {{.*#+}} ymm0 = ymm0[3,2,1,0] |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 388 | ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm1, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 389 | ; ALL-NEXT: retq |
| 390 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 3, i32 2, i32 1, i32 0, i32 7, i32 6, i32 5, i32 4> |
| 391 | ret <8 x double> %shuffle |
| 392 | } |
| 393 | |
| 394 | define <8 x double> @shuffle_v8f64_00234467(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 395 | ; ALL-LABEL: shuffle_v8f64_00234467: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 396 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 397 | ; ALL-NEXT: vpermilpd {{.*#+}} ymm1 = ymm0[0,0,2,3] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 398 | ; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 399 | ; ALL-NEXT: vpermilpd {{.*#+}} ymm0 = ymm0[0,0,2,3] |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 400 | ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm1, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 401 | ; ALL-NEXT: retq |
| 402 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 0, i32 2, i32 3, i32 4, i32 4, i32 6, i32 7> |
| 403 | ret <8 x double> %shuffle |
| 404 | } |
| 405 | |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 406 | define <8 x double> @shuffle_v8f64_00224466(<8 x double> %a, <8 x double> %b) { |
| 407 | ; ALL-LABEL: shuffle_v8f64_00224466: |
| 408 | ; ALL: # BB#0: |
| 409 | ; ALL-NEXT: vmovddup {{.*#+}} ymm1 = ymm0[0,0,2,2] |
| 410 | ; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm0 |
| 411 | ; ALL-NEXT: vmovddup {{.*#+}} ymm0 = ymm0[0,0,2,2] |
| 412 | ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm1, %zmm0 |
| 413 | ; ALL-NEXT: retq |
| 414 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 0, i32 2, i32 2, i32 4, i32 4, i32 6, i32 6> |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 415 | ret <8 x double> %shuffle |
| 416 | } |
| 417 | |
| 418 | define <8 x double> @shuffle_v8f64_10325476(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 419 | ; ALL-LABEL: shuffle_v8f64_10325476: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 420 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 421 | ; ALL-NEXT: vpermilpd {{.*#+}} ymm1 = ymm0[1,0,3,2] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 422 | ; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 423 | ; ALL-NEXT: vpermilpd {{.*#+}} ymm0 = ymm0[1,0,3,2] |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 424 | ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm1, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 425 | ; ALL-NEXT: retq |
| 426 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 1, i32 0, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6> |
| 427 | ret <8 x double> %shuffle |
| 428 | } |
| 429 | |
| 430 | define <8 x double> @shuffle_v8f64_11335577(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 431 | ; ALL-LABEL: shuffle_v8f64_11335577: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 432 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 433 | ; ALL-NEXT: vpermilpd {{.*#+}} ymm1 = ymm0[1,1,3,3] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 434 | ; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 435 | ; ALL-NEXT: vpermilpd {{.*#+}} ymm0 = ymm0[1,1,3,3] |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 436 | ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm1, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 437 | ; ALL-NEXT: retq |
| 438 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 1, i32 1, i32 3, i32 3, i32 5, i32 5, i32 7, i32 7> |
| 439 | ret <8 x double> %shuffle |
| 440 | } |
| 441 | |
| 442 | define <8 x double> @shuffle_v8f64_10235467(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 443 | ; ALL-LABEL: shuffle_v8f64_10235467: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 444 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 445 | ; ALL-NEXT: vpermilpd {{.*#+}} ymm1 = ymm0[1,0,2,3] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 446 | ; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 447 | ; ALL-NEXT: vpermilpd {{.*#+}} ymm0 = ymm0[1,0,2,3] |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 448 | ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm1, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 449 | ; ALL-NEXT: retq |
| 450 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 1, i32 0, i32 2, i32 3, i32 5, i32 4, i32 6, i32 7> |
| 451 | ret <8 x double> %shuffle |
| 452 | } |
| 453 | |
| 454 | define <8 x double> @shuffle_v8f64_10225466(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 455 | ; ALL-LABEL: shuffle_v8f64_10225466: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 456 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 457 | ; ALL-NEXT: vpermilpd {{.*#+}} ymm1 = ymm0[1,0,2,2] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 458 | ; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 459 | ; ALL-NEXT: vpermilpd {{.*#+}} ymm0 = ymm0[1,0,2,2] |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 460 | ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm1, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 461 | ; ALL-NEXT: retq |
| 462 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 1, i32 0, i32 2, i32 2, i32 5, i32 4, i32 6, i32 6> |
| 463 | ret <8 x double> %shuffle |
| 464 | } |
| 465 | |
| 466 | define <8 x double> @shuffle_v8f64_00015444(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 467 | ; ALL-LABEL: shuffle_v8f64_00015444: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 468 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 469 | ; ALL-NEXT: vpermpd {{.*#+}} ymm1 = ymm0[0,0,0,1] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 470 | ; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 471 | ; ALL-NEXT: vpermpd {{.*#+}} ymm0 = ymm0[1,0,0,0] |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 472 | ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm1, %zmm0 |
| 473 | ; ALL-NEXT: retq |
| 474 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 0, i32 0, i32 1, i32 5, i32 4, i32 4, i32 4> |
| 475 | ret <8 x double> %shuffle |
| 476 | } |
| 477 | |
| 478 | define <8 x double> @shuffle_v8f64_00204644(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 479 | ; ALL-LABEL: shuffle_v8f64_00204644: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 480 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 481 | ; ALL-NEXT: vpermpd {{.*#+}} ymm1 = ymm0[0,0,2,0] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 482 | ; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 483 | ; ALL-NEXT: vpermpd {{.*#+}} ymm0 = ymm0[0,2,0,0] |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 484 | ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm1, %zmm0 |
| 485 | ; ALL-NEXT: retq |
| 486 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 0, i32 2, i32 0, i32 4, i32 6, i32 4, i32 4> |
| 487 | ret <8 x double> %shuffle |
| 488 | } |
| 489 | |
| 490 | define <8 x double> @shuffle_v8f64_03004474(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 491 | ; ALL-LABEL: shuffle_v8f64_03004474: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 492 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 493 | ; ALL-NEXT: vpermpd {{.*#+}} ymm1 = ymm0[0,3,0,0] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 494 | ; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 495 | ; ALL-NEXT: vpermpd {{.*#+}} ymm0 = ymm0[0,0,3,0] |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 496 | ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm1, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 497 | ; ALL-NEXT: retq |
| 498 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 3, i32 0, i32 0, i32 4, i32 4, i32 7, i32 4> |
| 499 | ret <8 x double> %shuffle |
| 500 | } |
| 501 | |
| 502 | define <8 x double> @shuffle_v8f64_10004444(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 503 | ; ALL-LABEL: shuffle_v8f64_10004444: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 504 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 505 | ; ALL-NEXT: vpermpd {{.*#+}} ymm1 = ymm0[1,0,0,0] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 506 | ; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | b9d3fa1 | 2014-10-01 00:41:21 +0000 | [diff] [blame] | 507 | ; ALL-NEXT: vbroadcastsd %xmm0, %ymm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 508 | ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm1, %zmm0 |
| 509 | ; ALL-NEXT: retq |
| 510 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 1, i32 0, i32 0, i32 0, i32 4, i32 4, i32 4, i32 4> |
| 511 | ret <8 x double> %shuffle |
| 512 | } |
| 513 | |
| 514 | define <8 x double> @shuffle_v8f64_22006446(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 515 | ; ALL-LABEL: shuffle_v8f64_22006446: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 516 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 517 | ; ALL-NEXT: vpermpd {{.*#+}} ymm1 = ymm0[2,2,0,0] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 518 | ; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 519 | ; ALL-NEXT: vpermpd {{.*#+}} ymm0 = ymm0[2,0,0,2] |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 520 | ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm1, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 521 | ; ALL-NEXT: retq |
| 522 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 2, i32 2, i32 0, i32 0, i32 6, i32 4, i32 4, i32 6> |
| 523 | ret <8 x double> %shuffle |
| 524 | } |
| 525 | |
| 526 | define <8 x double> @shuffle_v8f64_33307474(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 527 | ; ALL-LABEL: shuffle_v8f64_33307474: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 528 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 529 | ; ALL-NEXT: vpermpd {{.*#+}} ymm1 = ymm0[3,3,3,0] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 530 | ; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 531 | ; ALL-NEXT: vpermpd {{.*#+}} ymm0 = ymm0[3,0,3,0] |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 532 | ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm1, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 533 | ; ALL-NEXT: retq |
| 534 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 3, i32 3, i32 3, i32 0, i32 7, i32 4, i32 7, i32 4> |
| 535 | ret <8 x double> %shuffle |
| 536 | } |
| 537 | |
| 538 | define <8 x double> @shuffle_v8f64_32104567(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 539 | ; ALL-LABEL: shuffle_v8f64_32104567: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 540 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 541 | ; ALL-NEXT: vpermpd {{.*#+}} ymm1 = ymm0[3,2,1,0] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 542 | ; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 543 | ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm1, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 544 | ; ALL-NEXT: retq |
| 545 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 3, i32 2, i32 1, i32 0, i32 4, i32 5, i32 6, i32 7> |
| 546 | ret <8 x double> %shuffle |
| 547 | } |
| 548 | |
| 549 | define <8 x double> @shuffle_v8f64_00236744(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 550 | ; ALL-LABEL: shuffle_v8f64_00236744: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 551 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 552 | ; ALL-NEXT: vpermilpd {{.*#+}} ymm1 = ymm0[0,0,2,3] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 553 | ; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 554 | ; ALL-NEXT: vpermpd {{.*#+}} ymm0 = ymm0[2,3,0,0] |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 555 | ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm1, %zmm0 |
| 556 | ; ALL-NEXT: retq |
| 557 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 0, i32 2, i32 3, i32 6, i32 7, i32 4, i32 4> |
| 558 | ret <8 x double> %shuffle |
| 559 | } |
| 560 | |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 561 | define <8 x double> @shuffle_v8f64_00226644(<8 x double> %a, <8 x double> %b) { |
| 562 | ; ALL-LABEL: shuffle_v8f64_00226644: |
| 563 | ; ALL: # BB#0: |
| 564 | ; ALL-NEXT: vmovddup {{.*#+}} ymm1 = ymm0[0,0,2,2] |
| 565 | ; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm0 |
| 566 | ; ALL-NEXT: vpermpd {{.*#+}} ymm0 = ymm0[2,2,0,0] |
| 567 | ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm1, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 568 | ; ALL-NEXT: retq |
| 569 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 0, i32 2, i32 2, i32 6, i32 6, i32 4, i32 4> |
| 570 | ret <8 x double> %shuffle |
| 571 | } |
| 572 | |
| 573 | define <8 x double> @shuffle_v8f64_10324567(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 574 | ; ALL-LABEL: shuffle_v8f64_10324567: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 575 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 576 | ; ALL-NEXT: vpermilpd {{.*#+}} ymm1 = ymm0[1,0,3,2] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 577 | ; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 578 | ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm1, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 579 | ; ALL-NEXT: retq |
| 580 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 1, i32 0, i32 3, i32 2, i32 4, i32 5, i32 6, i32 7> |
| 581 | ret <8 x double> %shuffle |
| 582 | } |
| 583 | |
| 584 | define <8 x double> @shuffle_v8f64_11334567(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 585 | ; ALL-LABEL: shuffle_v8f64_11334567: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 586 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 587 | ; ALL-NEXT: vpermilpd {{.*#+}} ymm1 = ymm0[1,1,3,3] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 588 | ; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 589 | ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm1, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 590 | ; ALL-NEXT: retq |
| 591 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 1, i32 1, i32 3, i32 3, i32 4, i32 5, i32 6, i32 7> |
| 592 | ret <8 x double> %shuffle |
| 593 | } |
| 594 | |
| 595 | define <8 x double> @shuffle_v8f64_01235467(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 596 | ; ALL-LABEL: shuffle_v8f64_01235467: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 597 | ; ALL: # BB#0: |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 598 | ; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm1 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 599 | ; ALL-NEXT: vpermilpd {{.*#+}} ymm1 = ymm1[1,0,2,3] |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 600 | ; ALL-NEXT: vinsertf64x4 $1, %ymm1, %zmm0, %zmm0 |
| 601 | ; ALL-NEXT: retq |
| 602 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 5, i32 4, i32 6, i32 7> |
| 603 | ret <8 x double> %shuffle |
| 604 | } |
| 605 | |
| 606 | define <8 x double> @shuffle_v8f64_01235466(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 607 | ; ALL-LABEL: shuffle_v8f64_01235466: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 608 | ; ALL: # BB#0: |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 609 | ; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm1 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 610 | ; ALL-NEXT: vpermilpd {{.*#+}} ymm1 = ymm1[1,0,2,2] |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 611 | ; ALL-NEXT: vinsertf64x4 $1, %ymm1, %zmm0, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 612 | ; ALL-NEXT: retq |
| 613 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 5, i32 4, i32 6, i32 6> |
| 614 | ret <8 x double> %shuffle |
| 615 | } |
| 616 | |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 617 | define <8 x double> @shuffle_v8f64_002u6u44(<8 x double> %a, <8 x double> %b) { |
| 618 | ; ALL-LABEL: shuffle_v8f64_002u6u44: |
| 619 | ; ALL: # BB#0: |
| 620 | ; ALL-NEXT: vmovddup {{.*#+}} ymm1 = ymm0[0,0,2,2] |
| 621 | ; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm0 |
| 622 | ; ALL-NEXT: vpermpd {{.*#+}} ymm0 = ymm0[2,1,0,0] |
| 623 | ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm1, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 624 | ; ALL-NEXT: retq |
| 625 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 0, i32 2, i32 undef, i32 6, i32 undef, i32 4, i32 4> |
| 626 | ret <8 x double> %shuffle |
| 627 | } |
| 628 | |
| 629 | define <8 x double> @shuffle_v8f64_00uu66uu(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 630 | ; ALL-LABEL: shuffle_v8f64_00uu66uu: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 631 | ; ALL: # BB#0: |
| Chandler Carruth | b9d3fa1 | 2014-10-01 00:41:21 +0000 | [diff] [blame] | 632 | ; ALL-NEXT: vbroadcastsd %xmm0, %ymm1 |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 633 | ; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 634 | ; ALL-NEXT: vpermpd {{.*#+}} ymm0 = ymm0[2,2,2,3] |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 635 | ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm1, %zmm0 |
| 636 | ; ALL-NEXT: retq |
| 637 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 0, i32 undef, i32 undef, i32 6, i32 6, i32 undef, i32 undef> |
| 638 | ret <8 x double> %shuffle |
| 639 | } |
| 640 | |
| 641 | define <8 x double> @shuffle_v8f64_103245uu(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 642 | ; ALL-LABEL: shuffle_v8f64_103245uu: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 643 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 644 | ; ALL-NEXT: vpermilpd {{.*#+}} ymm1 = ymm0[1,0,3,2] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 645 | ; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 646 | ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm1, %zmm0 |
| 647 | ; ALL-NEXT: retq |
| 648 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 1, i32 0, i32 3, i32 2, i32 4, i32 5, i32 undef, i32 undef> |
| 649 | ret <8 x double> %shuffle |
| 650 | } |
| 651 | |
| 652 | define <8 x double> @shuffle_v8f64_1133uu67(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 653 | ; ALL-LABEL: shuffle_v8f64_1133uu67: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 654 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 655 | ; ALL-NEXT: vpermilpd {{.*#+}} ymm1 = ymm0[1,1,3,3] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 656 | ; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 657 | ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm1, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 658 | ; ALL-NEXT: retq |
| 659 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 1, i32 1, i32 3, i32 3, i32 undef, i32 undef, i32 6, i32 7> |
| 660 | ret <8 x double> %shuffle |
| 661 | } |
| 662 | |
| 663 | define <8 x double> @shuffle_v8f64_0uu354uu(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 664 | ; ALL-LABEL: shuffle_v8f64_0uu354uu: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 665 | ; ALL: # BB#0: |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 666 | ; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm1 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 667 | ; ALL-NEXT: vpermilpd {{.*#+}} ymm1 = ymm1[1,0,2,2] |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 668 | ; ALL-NEXT: vinsertf64x4 $1, %ymm1, %zmm0, %zmm0 |
| 669 | ; ALL-NEXT: retq |
| 670 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 undef, i32 undef, i32 3, i32 5, i32 4, i32 undef, i32 undef> |
| 671 | ret <8 x double> %shuffle |
| 672 | } |
| 673 | |
| 674 | define <8 x double> @shuffle_v8f64_uuu3uu66(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 675 | ; ALL-LABEL: shuffle_v8f64_uuu3uu66: |
| 676 | ; ALL: # BB#0: |
| 677 | ; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm1 |
| 678 | ; ALL-NEXT: vmovddup {{.*#+}} ymm1 = ymm1[0,0,2,2] |
| 679 | ; ALL-NEXT: vinsertf64x4 $1, %ymm1, %zmm0, %zmm0 |
| 680 | ; ALL-NEXT: retq |
| 681 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 undef, i32 undef, i32 undef, i32 3, i32 undef, i32 undef, i32 6, i32 6> |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 682 | ret <8 x double> %shuffle |
| 683 | } |
| 684 | |
| 685 | define <8 x double> @shuffle_v8f64_c348cda0(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 686 | ; ALL-LABEL: shuffle_v8f64_c348cda0: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 687 | ; ALL: # BB#0: |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 688 | ; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm2 |
| Chandler Carruth | 9f4d9fa | 2014-10-05 11:41:36 +0000 | [diff] [blame] | 689 | ; ALL-NEXT: vperm2f128 {{.*#+}} ymm2 = ymm0[0,1],ymm2[0,1] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 690 | ; ALL-NEXT: vextractf64x4 $1, %zmm1, %ymm3 |
| Chandler Carruth | b9d3fa1 | 2014-10-01 00:41:21 +0000 | [diff] [blame] | 691 | ; ALL-NEXT: vbroadcastsd %xmm1, %ymm4 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 692 | ; ALL-NEXT: vblendpd {{.*#+}} ymm4 = ymm3[0,1,2],ymm4[3] |
| 693 | ; ALL-NEXT: vblendpd {{.*#+}} ymm2 = ymm4[0],ymm2[1,2],ymm4[3] |
| 694 | ; ALL-NEXT: vblendpd {{.*#+}} ymm1 = ymm3[0,1],ymm1[2],ymm3[3] |
| Chandler Carruth | b9d3fa1 | 2014-10-01 00:41:21 +0000 | [diff] [blame] | 695 | ; ALL-NEXT: vbroadcastsd %xmm0, %ymm0 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 696 | ; ALL-NEXT: vblendpd {{.*#+}} ymm0 = ymm1[0,1,2],ymm0[3] |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 697 | ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm2, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 698 | ; ALL-NEXT: retq |
| 699 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 12, i32 3, i32 4, i32 8, i32 12, i32 13, i32 10, i32 0> |
| 700 | ret <8 x double> %shuffle |
| 701 | } |
| 702 | |
| 703 | define <8 x double> @shuffle_v8f64_f511235a(<8 x double> %a, <8 x double> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 704 | ; ALL-LABEL: shuffle_v8f64_f511235a: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 705 | ; ALL: # BB#0: |
| Chandler Carruth | bf0fb06 | 2015-02-15 12:42:15 +0000 | [diff] [blame] | 706 | ; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm2 |
| 707 | ; ALL-NEXT: vblendpd {{.*#+}} ymm3 = ymm0[0],ymm2[1],ymm0[2,3] |
| 708 | ; ALL-NEXT: vpermpd {{.*#+}} ymm3 = ymm3[2,3,1,3] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 709 | ; ALL-NEXT: vmovddup {{.*#+}} ymm4 = ymm1[0,0,2,2] |
| Chandler Carruth | bf0fb06 | 2015-02-15 12:42:15 +0000 | [diff] [blame] | 710 | ; ALL-NEXT: vblendpd {{.*#+}} ymm3 = ymm3[0,1,2],ymm4[3] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 711 | ; ALL-NEXT: vpermpd {{.*#+}} ymm0 = ymm0[0,1,1,1] |
| Chandler Carruth | bf0fb06 | 2015-02-15 12:42:15 +0000 | [diff] [blame] | 712 | ; ALL-NEXT: vblendpd {{.*#+}} ymm0 = ymm0[0],ymm2[1],ymm0[2,3] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 713 | ; ALL-NEXT: vextractf64x4 $1, %zmm1, %ymm1 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 714 | ; ALL-NEXT: vpermpd {{.*#+}} ymm1 = ymm1[3,1,2,3] |
| Chandler Carruth | f3e8806 | 2014-10-03 22:43:17 +0000 | [diff] [blame] | 715 | ; ALL-NEXT: vblendpd {{.*#+}} ymm0 = ymm1[0],ymm0[1,2,3] |
| Chandler Carruth | bf0fb06 | 2015-02-15 12:42:15 +0000 | [diff] [blame] | 716 | ; ALL-NEXT: vinsertf64x4 $1, %ymm3, %zmm0, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 717 | ; ALL-NEXT: retq |
| 718 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 15, i32 5, i32 1, i32 1, i32 2, i32 3, i32 5, i32 10> |
| 719 | ret <8 x double> %shuffle |
| 720 | } |
| 721 | |
| 722 | define <8 x i64> @shuffle_v8i64_00000000(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 723 | ; ALL-LABEL: shuffle_v8i64_00000000: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 724 | ; ALL: # BB#0: |
| Robert Khasanov | dd09a8f | 2014-10-28 12:28:51 +0000 | [diff] [blame] | 725 | ; ALL-NEXT: vpbroadcastq %xmm0, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 726 | ; ALL-NEXT: retq |
| 727 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0> |
| 728 | ret <8 x i64> %shuffle |
| 729 | } |
| 730 | |
| 731 | define <8 x i64> @shuffle_v8i64_00000010(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 732 | ; ALL-LABEL: shuffle_v8i64_00000010: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 733 | ; ALL: # BB#0: |
| Chandler Carruth | b9d3fa1 | 2014-10-01 00:41:21 +0000 | [diff] [blame] | 734 | ; ALL-NEXT: vpbroadcastq %xmm0, %ymm1 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 735 | ; ALL-NEXT: vpermq {{.*#+}} ymm0 = ymm0[0,0,1,0] |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 736 | ; ALL-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 737 | ; ALL-NEXT: retq |
| 738 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0> |
| 739 | ret <8 x i64> %shuffle |
| 740 | } |
| 741 | |
| 742 | define <8 x i64> @shuffle_v8i64_00000200(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 743 | ; ALL-LABEL: shuffle_v8i64_00000200: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 744 | ; ALL: # BB#0: |
| Chandler Carruth | b9d3fa1 | 2014-10-01 00:41:21 +0000 | [diff] [blame] | 745 | ; ALL-NEXT: vpbroadcastq %xmm0, %ymm1 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 746 | ; ALL-NEXT: vpermq {{.*#+}} ymm0 = ymm0[0,2,0,0] |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 747 | ; ALL-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 748 | ; ALL-NEXT: retq |
| 749 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0> |
| 750 | ret <8 x i64> %shuffle |
| 751 | } |
| 752 | |
| 753 | define <8 x i64> @shuffle_v8i64_00003000(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 754 | ; ALL-LABEL: shuffle_v8i64_00003000: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 755 | ; ALL: # BB#0: |
| Chandler Carruth | b9d3fa1 | 2014-10-01 00:41:21 +0000 | [diff] [blame] | 756 | ; ALL-NEXT: vpbroadcastq %xmm0, %ymm1 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 757 | ; ALL-NEXT: vpermq {{.*#+}} ymm0 = ymm0[3,0,0,0] |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 758 | ; ALL-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0 |
| 759 | ; ALL-NEXT: retq |
| 760 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 0, i32 0, i32 0, i32 3, i32 0, i32 0, i32 0> |
| 761 | ret <8 x i64> %shuffle |
| 762 | } |
| 763 | |
| 764 | define <8 x i64> @shuffle_v8i64_00040000(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 765 | ; ALL-LABEL: shuffle_v8i64_00040000: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 766 | ; ALL: # BB#0: |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 767 | ; ALL-NEXT: vextracti64x4 $1, %zmm0, %ymm1 |
| Chandler Carruth | b9d3fa1 | 2014-10-01 00:41:21 +0000 | [diff] [blame] | 768 | ; ALL-NEXT: vpbroadcastq %xmm1, %ymm1 |
| 769 | ; ALL-NEXT: vpbroadcastq %xmm0, %ymm0 |
| 770 | ; ALL-NEXT: vpblendd {{.*#+}} ymm1 = ymm0[0,1,2,3,4,5],ymm1[6,7] |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 771 | ; ALL-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0 |
| 772 | ; ALL-NEXT: retq |
| 773 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 0, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0> |
| 774 | ret <8 x i64> %shuffle |
| 775 | } |
| 776 | |
| 777 | define <8 x i64> @shuffle_v8i64_00500000(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 778 | ; ALL-LABEL: shuffle_v8i64_00500000: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 779 | ; ALL: # BB#0: |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 780 | ; ALL-NEXT: vextracti64x4 $1, %zmm0, %ymm1 |
| Chandler Carruth | bf0fb06 | 2015-02-15 12:42:15 +0000 | [diff] [blame] | 781 | ; ALL-NEXT: vpblendd {{.*#+}} ymm1 = ymm0[0,1],ymm1[2,3],ymm0[4,5,6,7] |
| 782 | ; ALL-NEXT: vpermq {{.*#+}} ymm1 = ymm1[0,0,1,0] |
| Chandler Carruth | b9d3fa1 | 2014-10-01 00:41:21 +0000 | [diff] [blame] | 783 | ; ALL-NEXT: vpbroadcastq %xmm0, %ymm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 784 | ; ALL-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0 |
| 785 | ; ALL-NEXT: retq |
| 786 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 0, i32 5, i32 0, i32 0, i32 0, i32 0, i32 0> |
| 787 | ret <8 x i64> %shuffle |
| 788 | } |
| 789 | |
| 790 | define <8 x i64> @shuffle_v8i64_06000000(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 791 | ; ALL-LABEL: shuffle_v8i64_06000000: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 792 | ; ALL: # BB#0: |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 793 | ; ALL-NEXT: vextracti64x4 $1, %zmm0, %ymm1 |
| Chandler Carruth | bf0fb06 | 2015-02-15 12:42:15 +0000 | [diff] [blame] | 794 | ; ALL-NEXT: vpblendd {{.*#+}} ymm1 = ymm0[0,1,2,3],ymm1[4,5],ymm0[6,7] |
| 795 | ; ALL-NEXT: vpermq {{.*#+}} ymm1 = ymm1[0,2,0,0] |
| Chandler Carruth | b9d3fa1 | 2014-10-01 00:41:21 +0000 | [diff] [blame] | 796 | ; ALL-NEXT: vpbroadcastq %xmm0, %ymm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 797 | ; ALL-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0 |
| 798 | ; ALL-NEXT: retq |
| 799 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 6, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0> |
| 800 | ret <8 x i64> %shuffle |
| 801 | } |
| 802 | |
| 803 | define <8 x i64> @shuffle_v8i64_70000000(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 804 | ; ALL-LABEL: shuffle_v8i64_70000000: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 805 | ; ALL: # BB#0: |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 806 | ; ALL-NEXT: vextracti64x4 $1, %zmm0, %ymm1 |
| Chandler Carruth | bf0fb06 | 2015-02-15 12:42:15 +0000 | [diff] [blame] | 807 | ; ALL-NEXT: vpblendd {{.*#+}} ymm1 = ymm0[0,1,2,3,4,5],ymm1[6,7] |
| 808 | ; ALL-NEXT: vpermq {{.*#+}} ymm1 = ymm1[3,0,0,0] |
| Chandler Carruth | b9d3fa1 | 2014-10-01 00:41:21 +0000 | [diff] [blame] | 809 | ; ALL-NEXT: vpbroadcastq %xmm0, %ymm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 810 | ; ALL-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0 |
| 811 | ; ALL-NEXT: retq |
| 812 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 7, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0> |
| 813 | ret <8 x i64> %shuffle |
| 814 | } |
| 815 | |
| 816 | define <8 x i64> @shuffle_v8i64_01014545(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 817 | ; ALL-LABEL: shuffle_v8i64_01014545: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 818 | ; ALL: # BB#0: |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 819 | ; ALL-NEXT: vextracti64x4 $1, %zmm0, %ymm1 |
| Chandler Carruth | 9f4d9fa | 2014-10-05 11:41:36 +0000 | [diff] [blame] | 820 | ; ALL-NEXT: vinserti128 $1, %xmm1, %ymm1, %ymm1 |
| 821 | ; ALL-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0 |
| 822 | ; ALL-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 823 | ; ALL-NEXT: retq |
| 824 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 1, i32 0, i32 1, i32 4, i32 5, i32 4, i32 5> |
| 825 | ret <8 x i64> %shuffle |
| 826 | } |
| 827 | |
| 828 | define <8 x i64> @shuffle_v8i64_00112233(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 829 | ; ALL-LABEL: shuffle_v8i64_00112233: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 830 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 831 | ; ALL-NEXT: vpermq {{.*#+}} ymm1 = ymm0[0,0,1,1] |
| 832 | ; ALL-NEXT: vpermq {{.*#+}} ymm0 = ymm0[2,2,3,3] |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 833 | ; ALL-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 834 | ; ALL-NEXT: retq |
| 835 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 0, i32 1, i32 1, i32 2, i32 2, i32 3, i32 3> |
| 836 | ret <8 x i64> %shuffle |
| 837 | } |
| 838 | |
| 839 | define <8 x i64> @shuffle_v8i64_00001111(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 840 | ; ALL-LABEL: shuffle_v8i64_00001111: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 841 | ; ALL: # BB#0: |
| Chandler Carruth | b9d3fa1 | 2014-10-01 00:41:21 +0000 | [diff] [blame] | 842 | ; ALL-NEXT: vpbroadcastq %xmm0, %ymm1 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 843 | ; ALL-NEXT: vpermq {{.*#+}} ymm0 = ymm0[1,1,1,1] |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 844 | ; ALL-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0 |
| 845 | ; ALL-NEXT: retq |
| 846 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1> |
| 847 | ret <8 x i64> %shuffle |
| 848 | } |
| 849 | |
| 850 | define <8 x i64> @shuffle_v8i64_81a3c5e7(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 851 | ; ALL-LABEL: shuffle_v8i64_81a3c5e7: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 852 | ; ALL: # BB#0: |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 853 | ; ALL-NEXT: vextracti64x4 $1, %zmm0, %ymm2 |
| 854 | ; ALL-NEXT: vextracti64x4 $1, %zmm1, %ymm3 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 855 | ; ALL-NEXT: vpblendd {{.*#+}} ymm2 = ymm3[0,1],ymm2[2,3],ymm3[4,5],ymm2[6,7] |
| 856 | ; ALL-NEXT: vpblendd {{.*#+}} ymm0 = ymm1[0,1],ymm0[2,3],ymm1[4,5],ymm0[6,7] |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 857 | ; ALL-NEXT: vinserti64x4 $1, %ymm2, %zmm0, %zmm0 |
| 858 | ; ALL-NEXT: retq |
| 859 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 8, i32 1, i32 10, i32 3, i32 12, i32 5, i32 14, i32 7> |
| 860 | ret <8 x i64> %shuffle |
| 861 | } |
| 862 | |
| 863 | define <8 x i64> @shuffle_v8i64_08080808(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 864 | ; ALL-LABEL: shuffle_v8i64_08080808: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 865 | ; ALL: # BB#0: |
| Chandler Carruth | 9f4d9fa | 2014-10-05 11:41:36 +0000 | [diff] [blame] | 866 | ; ALL-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0 |
| Chandler Carruth | b9d3fa1 | 2014-10-01 00:41:21 +0000 | [diff] [blame] | 867 | ; ALL-NEXT: vpbroadcastq %xmm1, %ymm1 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 868 | ; ALL-NEXT: vpblendd {{.*#+}} ymm0 = ymm0[0,1],ymm1[2,3],ymm0[4,5],ymm1[6,7] |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 869 | ; ALL-NEXT: vinserti64x4 $1, %ymm0, %zmm0, %zmm0 |
| 870 | ; ALL-NEXT: retq |
| 871 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 8, i32 0, i32 8, i32 0, i32 8, i32 0, i32 8> |
| 872 | ret <8 x i64> %shuffle |
| 873 | } |
| 874 | |
| 875 | define <8 x i64> @shuffle_v8i64_08084c4c(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 876 | ; ALL-LABEL: shuffle_v8i64_08084c4c: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 877 | ; ALL: # BB#0: |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 878 | ; ALL-NEXT: vextracti64x4 $1, %zmm0, %ymm2 |
| Chandler Carruth | 9f4d9fa | 2014-10-05 11:41:36 +0000 | [diff] [blame] | 879 | ; ALL-NEXT: vinserti128 $1, %xmm2, %ymm2, %ymm2 |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 880 | ; ALL-NEXT: vextracti64x4 $1, %zmm1, %ymm3 |
| Chandler Carruth | b9d3fa1 | 2014-10-01 00:41:21 +0000 | [diff] [blame] | 881 | ; ALL-NEXT: vpbroadcastq %xmm3, %ymm3 |
| Chandler Carruth | 9f4d9fa | 2014-10-05 11:41:36 +0000 | [diff] [blame] | 882 | ; ALL-NEXT: vpblendd {{.*#+}} ymm2 = ymm2[0,1],ymm3[2,3],ymm2[4,5],ymm3[6,7] |
| 883 | ; ALL-NEXT: vinserti128 $1, %xmm0, %ymm0, %ymm0 |
| Chandler Carruth | b9d3fa1 | 2014-10-01 00:41:21 +0000 | [diff] [blame] | 884 | ; ALL-NEXT: vpbroadcastq %xmm1, %ymm1 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 885 | ; ALL-NEXT: vpblendd {{.*#+}} ymm0 = ymm0[0,1],ymm1[2,3],ymm0[4,5],ymm1[6,7] |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 886 | ; ALL-NEXT: vinserti64x4 $1, %ymm2, %zmm0, %zmm0 |
| 887 | ; ALL-NEXT: retq |
| 888 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 8, i32 0, i32 8, i32 4, i32 12, i32 4, i32 12> |
| 889 | ret <8 x i64> %shuffle |
| 890 | } |
| 891 | |
| 892 | define <8 x i64> @shuffle_v8i64_8823cc67(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 893 | ; ALL-LABEL: shuffle_v8i64_8823cc67: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 894 | ; ALL: # BB#0: |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 895 | ; ALL-NEXT: vextracti64x4 $1, %zmm0, %ymm2 |
| 896 | ; ALL-NEXT: vextracti64x4 $1, %zmm1, %ymm3 |
| Chandler Carruth | b9d3fa1 | 2014-10-01 00:41:21 +0000 | [diff] [blame] | 897 | ; ALL-NEXT: vpbroadcastq %xmm3, %ymm3 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 898 | ; ALL-NEXT: vpblendd {{.*#+}} ymm2 = ymm3[0,1,2,3],ymm2[4,5,6,7] |
| Chandler Carruth | b9d3fa1 | 2014-10-01 00:41:21 +0000 | [diff] [blame] | 899 | ; ALL-NEXT: vpbroadcastq %xmm1, %ymm1 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 900 | ; ALL-NEXT: vpblendd {{.*#+}} ymm0 = ymm1[0,1,2,3],ymm0[4,5,6,7] |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 901 | ; ALL-NEXT: vinserti64x4 $1, %ymm2, %zmm0, %zmm0 |
| 902 | ; ALL-NEXT: retq |
| 903 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 8, i32 8, i32 2, i32 3, i32 12, i32 12, i32 6, i32 7> |
| 904 | ret <8 x i64> %shuffle |
| 905 | } |
| 906 | |
| 907 | define <8 x i64> @shuffle_v8i64_9832dc76(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 908 | ; ALL-LABEL: shuffle_v8i64_9832dc76: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 909 | ; ALL: # BB#0: |
| Chandler Carruth | ce5a26b | 2014-11-21 14:53:03 +0000 | [diff] [blame] | 910 | ; ALL-NEXT: vpblendd {{.*#+}} ymm2 = ymm1[0,1,2,3],ymm0[4,5,6,7] |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 911 | ; ALL-NEXT: vpshufd {{.*#+}} ymm2 = ymm2[2,3,0,1,6,7,4,5] |
| Chandler Carruth | ce5a26b | 2014-11-21 14:53:03 +0000 | [diff] [blame] | 912 | ; ALL-NEXT: vextracti64x4 $1, %zmm0, %ymm0 |
| 913 | ; ALL-NEXT: vextracti64x4 $1, %zmm1, %ymm1 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 914 | ; ALL-NEXT: vpblendd {{.*#+}} ymm0 = ymm1[0,1,2,3],ymm0[4,5,6,7] |
| Chandler Carruth | ce5a26b | 2014-11-21 14:53:03 +0000 | [diff] [blame] | 915 | ; ALL-NEXT: vpshufd {{.*#+}} ymm0 = ymm0[2,3,0,1,6,7,4,5] |
| 916 | ; ALL-NEXT: vinserti64x4 $1, %ymm0, %zmm2, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 917 | ; ALL-NEXT: retq |
| 918 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 9, i32 8, i32 3, i32 2, i32 13, i32 12, i32 7, i32 6> |
| 919 | ret <8 x i64> %shuffle |
| 920 | } |
| 921 | |
| 922 | define <8 x i64> @shuffle_v8i64_9810dc54(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 923 | ; ALL-LABEL: shuffle_v8i64_9810dc54: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 924 | ; ALL: # BB#0: |
| Chandler Carruth | d2b19bc | 2014-11-21 13:56:05 +0000 | [diff] [blame] | 925 | ; ALL-NEXT: vinserti128 $1, %xmm0, %ymm1, %ymm2 |
| 926 | ; ALL-NEXT: vpshufd {{.*#+}} ymm2 = ymm2[2,3,0,1,6,7,4,5] |
| 927 | ; ALL-NEXT: vextracti64x4 $1, %zmm1, %ymm1 |
| 928 | ; ALL-NEXT: vextracti64x4 $1, %zmm0, %ymm0 |
| 929 | ; ALL-NEXT: vinserti128 $1, %xmm0, %ymm1, %ymm0 |
| 930 | ; ALL-NEXT: vpshufd {{.*#+}} ymm0 = ymm0[2,3,0,1,6,7,4,5] |
| 931 | ; ALL-NEXT: vinserti64x4 $1, %ymm0, %zmm2, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 932 | ; ALL-NEXT: retq |
| 933 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 9, i32 8, i32 1, i32 0, i32 13, i32 12, i32 5, i32 4> |
| 934 | ret <8 x i64> %shuffle |
| 935 | } |
| 936 | |
| 937 | define <8 x i64> @shuffle_v8i64_08194c5d(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 938 | ; ALL-LABEL: shuffle_v8i64_08194c5d: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 939 | ; ALL: # BB#0: |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 940 | ; ALL-NEXT: vextracti64x4 $1, %zmm1, %ymm2 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 941 | ; ALL-NEXT: vpermq {{.*#+}} ymm2 = ymm2[0,0,2,1] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 942 | ; ALL-NEXT: vextracti64x4 $1, %zmm0, %ymm3 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 943 | ; ALL-NEXT: vpermq {{.*#+}} ymm3 = ymm3[0,1,1,3] |
| 944 | ; ALL-NEXT: vpblendd {{.*#+}} ymm2 = ymm3[0,1],ymm2[2,3],ymm3[4,5],ymm2[6,7] |
| 945 | ; ALL-NEXT: vpermq {{.*#+}} ymm1 = ymm1[0,0,2,1] |
| 946 | ; ALL-NEXT: vpermq {{.*#+}} ymm0 = ymm0[0,1,1,3] |
| 947 | ; ALL-NEXT: vpblendd {{.*#+}} ymm0 = ymm0[0,1],ymm1[2,3],ymm0[4,5],ymm1[6,7] |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 948 | ; ALL-NEXT: vinserti64x4 $1, %ymm2, %zmm0, %zmm0 |
| 949 | ; ALL-NEXT: retq |
| 950 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 8, i32 1, i32 9, i32 4, i32 12, i32 5, i32 13> |
| 951 | ret <8 x i64> %shuffle |
| 952 | } |
| 953 | |
| 954 | define <8 x i64> @shuffle_v8i64_2a3b6e7f(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 955 | ; ALL-LABEL: shuffle_v8i64_2a3b6e7f: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 956 | ; ALL: # BB#0: |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 957 | ; ALL-NEXT: vextracti64x4 $1, %zmm1, %ymm2 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 958 | ; ALL-NEXT: vpermq {{.*#+}} ymm2 = ymm2[0,2,2,3] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 959 | ; ALL-NEXT: vextracti64x4 $1, %zmm0, %ymm3 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 960 | ; ALL-NEXT: vpermq {{.*#+}} ymm3 = ymm3[2,1,3,3] |
| 961 | ; ALL-NEXT: vpblendd {{.*#+}} ymm2 = ymm3[0,1],ymm2[2,3],ymm3[4,5],ymm2[6,7] |
| 962 | ; ALL-NEXT: vpermq {{.*#+}} ymm1 = ymm1[0,2,2,3] |
| 963 | ; ALL-NEXT: vpermq {{.*#+}} ymm0 = ymm0[2,1,3,3] |
| 964 | ; ALL-NEXT: vpblendd {{.*#+}} ymm0 = ymm0[0,1],ymm1[2,3],ymm0[4,5],ymm1[6,7] |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 965 | ; ALL-NEXT: vinserti64x4 $1, %ymm2, %zmm0, %zmm0 |
| 966 | ; ALL-NEXT: retq |
| 967 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 2, i32 10, i32 3, i32 11, i32 6, i32 14, i32 7, i32 15> |
| 968 | ret <8 x i64> %shuffle |
| 969 | } |
| 970 | |
| 971 | define <8 x i64> @shuffle_v8i64_08192a3b(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 972 | ; ALL-LABEL: shuffle_v8i64_08192a3b: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 973 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 974 | ; ALL-NEXT: vpermq {{.*#+}} ymm2 = ymm1[0,2,2,3] |
| 975 | ; ALL-NEXT: vpermq {{.*#+}} ymm3 = ymm0[2,1,3,3] |
| 976 | ; ALL-NEXT: vpblendd {{.*#+}} ymm2 = ymm3[0,1],ymm2[2,3],ymm3[4,5],ymm2[6,7] |
| 977 | ; ALL-NEXT: vpermq {{.*#+}} ymm1 = ymm1[0,0,2,1] |
| 978 | ; ALL-NEXT: vpermq {{.*#+}} ymm0 = ymm0[0,1,1,3] |
| 979 | ; ALL-NEXT: vpblendd {{.*#+}} ymm0 = ymm0[0,1],ymm1[2,3],ymm0[4,5],ymm1[6,7] |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 980 | ; ALL-NEXT: vinserti64x4 $1, %ymm2, %zmm0, %zmm0 |
| 981 | ; ALL-NEXT: retq |
| 982 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 8, i32 1, i32 9, i32 2, i32 10, i32 3, i32 11> |
| 983 | ret <8 x i64> %shuffle |
| 984 | } |
| 985 | |
| 986 | define <8 x i64> @shuffle_v8i64_08991abb(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 987 | ; ALL-LABEL: shuffle_v8i64_08991abb: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 988 | ; ALL: # BB#0: |
| Chandler Carruth | bf0fb06 | 2015-02-15 12:42:15 +0000 | [diff] [blame] | 989 | ; ALL-NEXT: vpermq {{.*#+}} ymm2 = ymm1[0,0,1,1] |
| 990 | ; ALL-NEXT: vpblendd {{.*#+}} ymm2 = ymm0[0,1],ymm2[2,3,4,5,6,7] |
| 991 | ; ALL-NEXT: vpblendd {{.*#+}} ymm0 = ymm1[0,1],ymm0[2,3],ymm1[4,5,6,7] |
| 992 | ; ALL-NEXT: vpermq {{.*#+}} ymm0 = ymm0[1,2,3,3] |
| 993 | ; ALL-NEXT: vinserti64x4 $1, %ymm0, %zmm2, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 994 | ; ALL-NEXT: retq |
| 995 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 8, i32 9, i32 9, i32 1, i32 10, i32 11, i32 11> |
| 996 | ret <8 x i64> %shuffle |
| 997 | } |
| 998 | |
| 999 | define <8 x i64> @shuffle_v8i64_091b2d3f(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1000 | ; ALL-LABEL: shuffle_v8i64_091b2d3f: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1001 | ; ALL: # BB#0: |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 1002 | ; ALL-NEXT: vextracti64x4 $1, %zmm1, %ymm2 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1003 | ; ALL-NEXT: vpermq {{.*#+}} ymm3 = ymm0[2,1,3,3] |
| 1004 | ; ALL-NEXT: vpblendd {{.*#+}} ymm2 = ymm3[0,1],ymm2[2,3],ymm3[4,5],ymm2[6,7] |
| 1005 | ; ALL-NEXT: vpermq {{.*#+}} ymm0 = ymm0[0,1,1,3] |
| 1006 | ; ALL-NEXT: vpblendd {{.*#+}} ymm0 = ymm0[0,1],ymm1[2,3],ymm0[4,5],ymm1[6,7] |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1007 | ; ALL-NEXT: vinserti64x4 $1, %ymm2, %zmm0, %zmm0 |
| 1008 | ; ALL-NEXT: retq |
| 1009 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 9, i32 1, i32 11, i32 2, i32 13, i32 3, i32 15> |
| 1010 | ret <8 x i64> %shuffle |
| 1011 | } |
| 1012 | |
| 1013 | define <8 x i64> @shuffle_v8i64_09ab1def(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1014 | ; ALL-LABEL: shuffle_v8i64_09ab1def: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1015 | ; ALL: # BB#0: |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 1016 | ; ALL-NEXT: vextracti64x4 $1, %zmm1, %ymm2 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1017 | ; ALL-NEXT: vpshufd {{.*#+}} ymm3 = ymm0[2,3,2,3,6,7,6,7] |
| 1018 | ; ALL-NEXT: vpblendd {{.*#+}} ymm2 = ymm3[0,1],ymm2[2,3,4,5,6,7] |
| 1019 | ; ALL-NEXT: vpblendd {{.*#+}} ymm0 = ymm0[0,1],ymm1[2,3,4,5,6,7] |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1020 | ; ALL-NEXT: vinserti64x4 $1, %ymm2, %zmm0, %zmm0 |
| 1021 | ; ALL-NEXT: retq |
| 1022 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 9, i32 10, i32 11, i32 1, i32 13, i32 14, i32 15> |
| 1023 | ret <8 x i64> %shuffle |
| 1024 | } |
| 1025 | |
| 1026 | define <8 x i64> @shuffle_v8i64_00014445(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1027 | ; ALL-LABEL: shuffle_v8i64_00014445: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1028 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1029 | ; ALL-NEXT: vpermq {{.*#+}} ymm1 = ymm0[0,0,0,1] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 1030 | ; ALL-NEXT: vextracti64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1031 | ; ALL-NEXT: vpermq {{.*#+}} ymm0 = ymm0[0,0,0,1] |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 1032 | ; ALL-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1033 | ; ALL-NEXT: retq |
| 1034 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 0, i32 0, i32 1, i32 4, i32 4, i32 4, i32 5> |
| 1035 | ret <8 x i64> %shuffle |
| 1036 | } |
| 1037 | |
| 1038 | define <8 x i64> @shuffle_v8i64_00204464(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1039 | ; ALL-LABEL: shuffle_v8i64_00204464: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1040 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1041 | ; ALL-NEXT: vpermq {{.*#+}} ymm1 = ymm0[0,0,2,0] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 1042 | ; ALL-NEXT: vextracti64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1043 | ; ALL-NEXT: vpermq {{.*#+}} ymm0 = ymm0[0,0,2,0] |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 1044 | ; ALL-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1045 | ; ALL-NEXT: retq |
| 1046 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 0, i32 2, i32 0, i32 4, i32 4, i32 6, i32 4> |
| 1047 | ret <8 x i64> %shuffle |
| 1048 | } |
| 1049 | |
| 1050 | define <8 x i64> @shuffle_v8i64_03004744(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1051 | ; ALL-LABEL: shuffle_v8i64_03004744: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1052 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1053 | ; ALL-NEXT: vpermq {{.*#+}} ymm1 = ymm0[0,3,0,0] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 1054 | ; ALL-NEXT: vextracti64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1055 | ; ALL-NEXT: vpermq {{.*#+}} ymm0 = ymm0[0,3,0,0] |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 1056 | ; ALL-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1057 | ; ALL-NEXT: retq |
| 1058 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 3, i32 0, i32 0, i32 4, i32 7, i32 4, i32 4> |
| 1059 | ret <8 x i64> %shuffle |
| 1060 | } |
| 1061 | |
| 1062 | define <8 x i64> @shuffle_v8i64_10005444(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1063 | ; ALL-LABEL: shuffle_v8i64_10005444: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1064 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1065 | ; ALL-NEXT: vpermq {{.*#+}} ymm1 = ymm0[1,0,0,0] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 1066 | ; ALL-NEXT: vextracti64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1067 | ; ALL-NEXT: vpermq {{.*#+}} ymm0 = ymm0[1,0,0,0] |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 1068 | ; ALL-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1069 | ; ALL-NEXT: retq |
| 1070 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 1, i32 0, i32 0, i32 0, i32 5, i32 4, i32 4, i32 4> |
| 1071 | ret <8 x i64> %shuffle |
| 1072 | } |
| 1073 | |
| 1074 | define <8 x i64> @shuffle_v8i64_22006644(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1075 | ; ALL-LABEL: shuffle_v8i64_22006644: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1076 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1077 | ; ALL-NEXT: vpermq {{.*#+}} ymm1 = ymm0[2,2,0,0] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 1078 | ; ALL-NEXT: vextracti64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1079 | ; ALL-NEXT: vpermq {{.*#+}} ymm0 = ymm0[2,2,0,0] |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 1080 | ; ALL-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1081 | ; ALL-NEXT: retq |
| 1082 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 2, i32 2, i32 0, i32 0, i32 6, i32 6, i32 4, i32 4> |
| 1083 | ret <8 x i64> %shuffle |
| 1084 | } |
| 1085 | |
| 1086 | define <8 x i64> @shuffle_v8i64_33307774(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1087 | ; ALL-LABEL: shuffle_v8i64_33307774: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1088 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1089 | ; ALL-NEXT: vpermq {{.*#+}} ymm1 = ymm0[3,3,3,0] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 1090 | ; ALL-NEXT: vextracti64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1091 | ; ALL-NEXT: vpermq {{.*#+}} ymm0 = ymm0[3,3,3,0] |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 1092 | ; ALL-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1093 | ; ALL-NEXT: retq |
| 1094 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 3, i32 3, i32 3, i32 0, i32 7, i32 7, i32 7, i32 4> |
| 1095 | ret <8 x i64> %shuffle |
| 1096 | } |
| 1097 | |
| 1098 | define <8 x i64> @shuffle_v8i64_32107654(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1099 | ; ALL-LABEL: shuffle_v8i64_32107654: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1100 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1101 | ; ALL-NEXT: vpermq {{.*#+}} ymm1 = ymm0[3,2,1,0] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 1102 | ; ALL-NEXT: vextracti64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1103 | ; ALL-NEXT: vpermq {{.*#+}} ymm0 = ymm0[3,2,1,0] |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 1104 | ; ALL-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1105 | ; ALL-NEXT: retq |
| 1106 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 3, i32 2, i32 1, i32 0, i32 7, i32 6, i32 5, i32 4> |
| 1107 | ret <8 x i64> %shuffle |
| 1108 | } |
| 1109 | |
| 1110 | define <8 x i64> @shuffle_v8i64_00234467(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1111 | ; ALL-LABEL: shuffle_v8i64_00234467: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1112 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1113 | ; ALL-NEXT: vpermq {{.*#+}} ymm1 = ymm0[0,0,2,3] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 1114 | ; ALL-NEXT: vextracti64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1115 | ; ALL-NEXT: vpermq {{.*#+}} ymm0 = ymm0[0,0,2,3] |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 1116 | ; ALL-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1117 | ; ALL-NEXT: retq |
| 1118 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 0, i32 2, i32 3, i32 4, i32 4, i32 6, i32 7> |
| 1119 | ret <8 x i64> %shuffle |
| 1120 | } |
| 1121 | |
| 1122 | define <8 x i64> @shuffle_v8i64_00224466(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1123 | ; ALL-LABEL: shuffle_v8i64_00224466: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1124 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1125 | ; ALL-NEXT: vpshufd {{.*#+}} ymm1 = ymm0[0,1,0,1,4,5,4,5] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 1126 | ; ALL-NEXT: vextracti64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1127 | ; ALL-NEXT: vpshufd {{.*#+}} ymm0 = ymm0[0,1,0,1,4,5,4,5] |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 1128 | ; ALL-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1129 | ; ALL-NEXT: retq |
| 1130 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 0, i32 2, i32 2, i32 4, i32 4, i32 6, i32 6> |
| 1131 | ret <8 x i64> %shuffle |
| 1132 | } |
| 1133 | |
| 1134 | define <8 x i64> @shuffle_v8i64_10325476(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1135 | ; ALL-LABEL: shuffle_v8i64_10325476: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1136 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1137 | ; ALL-NEXT: vpshufd {{.*#+}} ymm1 = ymm0[2,3,0,1,6,7,4,5] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 1138 | ; ALL-NEXT: vextracti64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1139 | ; ALL-NEXT: vpshufd {{.*#+}} ymm0 = ymm0[2,3,0,1,6,7,4,5] |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 1140 | ; ALL-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1141 | ; ALL-NEXT: retq |
| 1142 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 1, i32 0, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6> |
| 1143 | ret <8 x i64> %shuffle |
| 1144 | } |
| 1145 | |
| 1146 | define <8 x i64> @shuffle_v8i64_11335577(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1147 | ; ALL-LABEL: shuffle_v8i64_11335577: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1148 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1149 | ; ALL-NEXT: vpshufd {{.*#+}} ymm1 = ymm0[2,3,2,3,6,7,6,7] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 1150 | ; ALL-NEXT: vextracti64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1151 | ; ALL-NEXT: vpshufd {{.*#+}} ymm0 = ymm0[2,3,2,3,6,7,6,7] |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 1152 | ; ALL-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1153 | ; ALL-NEXT: retq |
| 1154 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 1, i32 1, i32 3, i32 3, i32 5, i32 5, i32 7, i32 7> |
| 1155 | ret <8 x i64> %shuffle |
| 1156 | } |
| 1157 | |
| 1158 | define <8 x i64> @shuffle_v8i64_10235467(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1159 | ; ALL-LABEL: shuffle_v8i64_10235467: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1160 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1161 | ; ALL-NEXT: vpermq {{.*#+}} ymm1 = ymm0[1,0,2,3] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 1162 | ; ALL-NEXT: vextracti64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1163 | ; ALL-NEXT: vpermq {{.*#+}} ymm0 = ymm0[1,0,2,3] |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 1164 | ; ALL-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1165 | ; ALL-NEXT: retq |
| 1166 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 1, i32 0, i32 2, i32 3, i32 5, i32 4, i32 6, i32 7> |
| 1167 | ret <8 x i64> %shuffle |
| 1168 | } |
| 1169 | |
| 1170 | define <8 x i64> @shuffle_v8i64_10225466(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1171 | ; ALL-LABEL: shuffle_v8i64_10225466: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1172 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1173 | ; ALL-NEXT: vpermq {{.*#+}} ymm1 = ymm0[1,0,2,2] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 1174 | ; ALL-NEXT: vextracti64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1175 | ; ALL-NEXT: vpermq {{.*#+}} ymm0 = ymm0[1,0,2,2] |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 1176 | ; ALL-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1177 | ; ALL-NEXT: retq |
| 1178 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 1, i32 0, i32 2, i32 2, i32 5, i32 4, i32 6, i32 6> |
| 1179 | ret <8 x i64> %shuffle |
| 1180 | } |
| 1181 | |
| 1182 | define <8 x i64> @shuffle_v8i64_00015444(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1183 | ; ALL-LABEL: shuffle_v8i64_00015444: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1184 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1185 | ; ALL-NEXT: vpermq {{.*#+}} ymm1 = ymm0[0,0,0,1] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 1186 | ; ALL-NEXT: vextracti64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1187 | ; ALL-NEXT: vpermq {{.*#+}} ymm0 = ymm0[1,0,0,0] |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1188 | ; ALL-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0 |
| 1189 | ; ALL-NEXT: retq |
| 1190 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 0, i32 0, i32 1, i32 5, i32 4, i32 4, i32 4> |
| 1191 | ret <8 x i64> %shuffle |
| 1192 | } |
| 1193 | |
| 1194 | define <8 x i64> @shuffle_v8i64_00204644(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1195 | ; ALL-LABEL: shuffle_v8i64_00204644: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1196 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1197 | ; ALL-NEXT: vpermq {{.*#+}} ymm1 = ymm0[0,0,2,0] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 1198 | ; ALL-NEXT: vextracti64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1199 | ; ALL-NEXT: vpermq {{.*#+}} ymm0 = ymm0[0,2,0,0] |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1200 | ; ALL-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0 |
| 1201 | ; ALL-NEXT: retq |
| 1202 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 0, i32 2, i32 0, i32 4, i32 6, i32 4, i32 4> |
| 1203 | ret <8 x i64> %shuffle |
| 1204 | } |
| 1205 | |
| 1206 | define <8 x i64> @shuffle_v8i64_03004474(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1207 | ; ALL-LABEL: shuffle_v8i64_03004474: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1208 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1209 | ; ALL-NEXT: vpermq {{.*#+}} ymm1 = ymm0[0,3,0,0] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 1210 | ; ALL-NEXT: vextracti64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1211 | ; ALL-NEXT: vpermq {{.*#+}} ymm0 = ymm0[0,0,3,0] |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 1212 | ; ALL-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1213 | ; ALL-NEXT: retq |
| 1214 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 3, i32 0, i32 0, i32 4, i32 4, i32 7, i32 4> |
| 1215 | ret <8 x i64> %shuffle |
| 1216 | } |
| 1217 | |
| 1218 | define <8 x i64> @shuffle_v8i64_10004444(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1219 | ; ALL-LABEL: shuffle_v8i64_10004444: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1220 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1221 | ; ALL-NEXT: vpermq {{.*#+}} ymm1 = ymm0[1,0,0,0] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 1222 | ; ALL-NEXT: vextracti64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | b9d3fa1 | 2014-10-01 00:41:21 +0000 | [diff] [blame] | 1223 | ; ALL-NEXT: vpbroadcastq %xmm0, %ymm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1224 | ; ALL-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0 |
| 1225 | ; ALL-NEXT: retq |
| 1226 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 1, i32 0, i32 0, i32 0, i32 4, i32 4, i32 4, i32 4> |
| 1227 | ret <8 x i64> %shuffle |
| 1228 | } |
| 1229 | |
| 1230 | define <8 x i64> @shuffle_v8i64_22006446(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1231 | ; ALL-LABEL: shuffle_v8i64_22006446: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1232 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1233 | ; ALL-NEXT: vpermq {{.*#+}} ymm1 = ymm0[2,2,0,0] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 1234 | ; ALL-NEXT: vextracti64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1235 | ; ALL-NEXT: vpermq {{.*#+}} ymm0 = ymm0[2,0,0,2] |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 1236 | ; ALL-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1237 | ; ALL-NEXT: retq |
| 1238 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 2, i32 2, i32 0, i32 0, i32 6, i32 4, i32 4, i32 6> |
| 1239 | ret <8 x i64> %shuffle |
| 1240 | } |
| 1241 | |
| 1242 | define <8 x i64> @shuffle_v8i64_33307474(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1243 | ; ALL-LABEL: shuffle_v8i64_33307474: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1244 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1245 | ; ALL-NEXT: vpermq {{.*#+}} ymm1 = ymm0[3,3,3,0] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 1246 | ; ALL-NEXT: vextracti64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1247 | ; ALL-NEXT: vpermq {{.*#+}} ymm0 = ymm0[3,0,3,0] |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 1248 | ; ALL-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1249 | ; ALL-NEXT: retq |
| 1250 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 3, i32 3, i32 3, i32 0, i32 7, i32 4, i32 7, i32 4> |
| 1251 | ret <8 x i64> %shuffle |
| 1252 | } |
| 1253 | |
| 1254 | define <8 x i64> @shuffle_v8i64_32104567(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1255 | ; ALL-LABEL: shuffle_v8i64_32104567: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1256 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1257 | ; ALL-NEXT: vpermq {{.*#+}} ymm1 = ymm0[3,2,1,0] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 1258 | ; ALL-NEXT: vextracti64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 1259 | ; ALL-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1260 | ; ALL-NEXT: retq |
| 1261 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 3, i32 2, i32 1, i32 0, i32 4, i32 5, i32 6, i32 7> |
| 1262 | ret <8 x i64> %shuffle |
| 1263 | } |
| 1264 | |
| 1265 | define <8 x i64> @shuffle_v8i64_00236744(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1266 | ; ALL-LABEL: shuffle_v8i64_00236744: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1267 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1268 | ; ALL-NEXT: vpermq {{.*#+}} ymm1 = ymm0[0,0,2,3] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 1269 | ; ALL-NEXT: vextracti64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1270 | ; ALL-NEXT: vpermq {{.*#+}} ymm0 = ymm0[2,3,0,0] |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1271 | ; ALL-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0 |
| 1272 | ; ALL-NEXT: retq |
| 1273 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 0, i32 2, i32 3, i32 6, i32 7, i32 4, i32 4> |
| 1274 | ret <8 x i64> %shuffle |
| 1275 | } |
| 1276 | |
| 1277 | define <8 x i64> @shuffle_v8i64_00226644(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1278 | ; ALL-LABEL: shuffle_v8i64_00226644: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1279 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1280 | ; ALL-NEXT: vpshufd {{.*#+}} ymm1 = ymm0[0,1,0,1,4,5,4,5] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 1281 | ; ALL-NEXT: vextracti64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1282 | ; ALL-NEXT: vpermq {{.*#+}} ymm0 = ymm0[2,2,0,0] |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 1283 | ; ALL-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1284 | ; ALL-NEXT: retq |
| 1285 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 0, i32 2, i32 2, i32 6, i32 6, i32 4, i32 4> |
| 1286 | ret <8 x i64> %shuffle |
| 1287 | } |
| 1288 | |
| 1289 | define <8 x i64> @shuffle_v8i64_10324567(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1290 | ; ALL-LABEL: shuffle_v8i64_10324567: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1291 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1292 | ; ALL-NEXT: vpshufd {{.*#+}} ymm1 = ymm0[2,3,0,1,6,7,4,5] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 1293 | ; ALL-NEXT: vextracti64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 1294 | ; ALL-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1295 | ; ALL-NEXT: retq |
| 1296 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 1, i32 0, i32 3, i32 2, i32 4, i32 5, i32 6, i32 7> |
| 1297 | ret <8 x i64> %shuffle |
| 1298 | } |
| 1299 | |
| 1300 | define <8 x i64> @shuffle_v8i64_11334567(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1301 | ; ALL-LABEL: shuffle_v8i64_11334567: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1302 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1303 | ; ALL-NEXT: vpshufd {{.*#+}} ymm1 = ymm0[2,3,2,3,6,7,6,7] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 1304 | ; ALL-NEXT: vextracti64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 1305 | ; ALL-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1306 | ; ALL-NEXT: retq |
| 1307 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 1, i32 1, i32 3, i32 3, i32 4, i32 5, i32 6, i32 7> |
| 1308 | ret <8 x i64> %shuffle |
| 1309 | } |
| 1310 | |
| 1311 | define <8 x i64> @shuffle_v8i64_01235467(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1312 | ; ALL-LABEL: shuffle_v8i64_01235467: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1313 | ; ALL: # BB#0: |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 1314 | ; ALL-NEXT: vextracti64x4 $1, %zmm0, %ymm1 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1315 | ; ALL-NEXT: vpermq {{.*#+}} ymm1 = ymm1[1,0,2,3] |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1316 | ; ALL-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0 |
| 1317 | ; ALL-NEXT: retq |
| 1318 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 5, i32 4, i32 6, i32 7> |
| 1319 | ret <8 x i64> %shuffle |
| 1320 | } |
| 1321 | |
| 1322 | define <8 x i64> @shuffle_v8i64_01235466(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1323 | ; ALL-LABEL: shuffle_v8i64_01235466: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1324 | ; ALL: # BB#0: |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 1325 | ; ALL-NEXT: vextracti64x4 $1, %zmm0, %ymm1 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1326 | ; ALL-NEXT: vpermq {{.*#+}} ymm1 = ymm1[1,0,2,2] |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 1327 | ; ALL-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1328 | ; ALL-NEXT: retq |
| 1329 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 5, i32 4, i32 6, i32 6> |
| 1330 | ret <8 x i64> %shuffle |
| 1331 | } |
| 1332 | |
| 1333 | define <8 x i64> @shuffle_v8i64_002u6u44(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1334 | ; ALL-LABEL: shuffle_v8i64_002u6u44: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1335 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1336 | ; ALL-NEXT: vpshufd {{.*#+}} ymm1 = ymm0[0,1,0,1,4,5,4,5] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 1337 | ; ALL-NEXT: vextracti64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1338 | ; ALL-NEXT: vpermq {{.*#+}} ymm0 = ymm0[2,1,0,0] |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 1339 | ; ALL-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1340 | ; ALL-NEXT: retq |
| 1341 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 0, i32 2, i32 undef, i32 6, i32 undef, i32 4, i32 4> |
| 1342 | ret <8 x i64> %shuffle |
| 1343 | } |
| 1344 | |
| 1345 | define <8 x i64> @shuffle_v8i64_00uu66uu(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1346 | ; ALL-LABEL: shuffle_v8i64_00uu66uu: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1347 | ; ALL: # BB#0: |
| Chandler Carruth | b9d3fa1 | 2014-10-01 00:41:21 +0000 | [diff] [blame] | 1348 | ; ALL-NEXT: vpbroadcastq %xmm0, %ymm1 |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 1349 | ; ALL-NEXT: vextracti64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1350 | ; ALL-NEXT: vpermq {{.*#+}} ymm0 = ymm0[2,2,2,3] |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1351 | ; ALL-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0 |
| 1352 | ; ALL-NEXT: retq |
| 1353 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 0, i32 undef, i32 undef, i32 6, i32 6, i32 undef, i32 undef> |
| 1354 | ret <8 x i64> %shuffle |
| 1355 | } |
| 1356 | |
| 1357 | define <8 x i64> @shuffle_v8i64_103245uu(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1358 | ; ALL-LABEL: shuffle_v8i64_103245uu: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1359 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1360 | ; ALL-NEXT: vpshufd {{.*#+}} ymm1 = ymm0[2,3,0,1,6,7,4,5] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 1361 | ; ALL-NEXT: vextracti64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1362 | ; ALL-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0 |
| 1363 | ; ALL-NEXT: retq |
| 1364 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 1, i32 0, i32 3, i32 2, i32 4, i32 5, i32 undef, i32 undef> |
| 1365 | ret <8 x i64> %shuffle |
| 1366 | } |
| 1367 | |
| 1368 | define <8 x i64> @shuffle_v8i64_1133uu67(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1369 | ; ALL-LABEL: shuffle_v8i64_1133uu67: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1370 | ; ALL: # BB#0: |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1371 | ; ALL-NEXT: vpshufd {{.*#+}} ymm1 = ymm0[2,3,2,3,6,7,6,7] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 1372 | ; ALL-NEXT: vextracti64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 1373 | ; ALL-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1374 | ; ALL-NEXT: retq |
| 1375 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 1, i32 1, i32 3, i32 3, i32 undef, i32 undef, i32 6, i32 7> |
| 1376 | ret <8 x i64> %shuffle |
| 1377 | } |
| 1378 | |
| 1379 | define <8 x i64> @shuffle_v8i64_0uu354uu(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1380 | ; ALL-LABEL: shuffle_v8i64_0uu354uu: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1381 | ; ALL: # BB#0: |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 1382 | ; ALL-NEXT: vextracti64x4 $1, %zmm0, %ymm1 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1383 | ; ALL-NEXT: vpshufd {{.*#+}} ymm1 = ymm1[2,3,0,1,6,7,4,5] |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1384 | ; ALL-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0 |
| 1385 | ; ALL-NEXT: retq |
| 1386 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 undef, i32 undef, i32 3, i32 5, i32 4, i32 undef, i32 undef> |
| 1387 | ret <8 x i64> %shuffle |
| 1388 | } |
| 1389 | |
| 1390 | define <8 x i64> @shuffle_v8i64_uuu3uu66(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1391 | ; ALL-LABEL: shuffle_v8i64_uuu3uu66: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1392 | ; ALL: # BB#0: |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 1393 | ; ALL-NEXT: vextracti64x4 $1, %zmm0, %ymm1 |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1394 | ; ALL-NEXT: vpshufd {{.*#+}} ymm1 = ymm1[0,1,0,1,4,5,4,5] |
| Chandler Carruth | c712927 | 2014-09-29 00:37:27 +0000 | [diff] [blame] | 1395 | ; ALL-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1396 | ; ALL-NEXT: retq |
| 1397 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 undef, i32 undef, i32 undef, i32 3, i32 undef, i32 undef, i32 6, i32 6> |
| 1398 | ret <8 x i64> %shuffle |
| 1399 | } |
| 1400 | |
| 1401 | define <8 x i64> @shuffle_v8i64_6caa87e5(<8 x i64> %a, <8 x i64> %b) { |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1402 | ; ALL-LABEL: shuffle_v8i64_6caa87e5: |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1403 | ; ALL: # BB#0: |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 1404 | ; ALL-NEXT: vextracti64x4 $1, %zmm0, %ymm0 |
| Chandler Carruth | 9f4d9fa | 2014-10-05 11:41:36 +0000 | [diff] [blame] | 1405 | ; ALL-NEXT: vperm2i128 {{.*#+}} ymm2 = ymm0[0,1,0,1] |
| Chandler Carruth | bb525e3 | 2015-02-04 10:46:53 +0000 | [diff] [blame] | 1406 | ; ALL-NEXT: vextracti64x4 $1, %zmm1, %ymm3 |
| Chandler Carruth | 9f4d9fa | 2014-10-05 11:41:36 +0000 | [diff] [blame] | 1407 | ; ALL-NEXT: vpblendd {{.*#+}} ymm4 = ymm1[0,1,2,3],ymm3[4,5],ymm1[6,7] |
| 1408 | ; ALL-NEXT: vpblendd {{.*#+}} ymm2 = ymm4[0,1],ymm2[2,3],ymm4[4,5],ymm2[6,7] |
| 1409 | ; ALL-NEXT: vperm2i128 {{.*#+}} ymm0 = ymm0[2,3,0,1] |
| Chandler Carruth | ce5a26b | 2014-11-21 14:53:03 +0000 | [diff] [blame] | 1410 | ; ALL-NEXT: vpblendd {{.*#+}} ymm1 = ymm3[0,1,2,3],ymm1[4,5,6,7] |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1411 | ; ALL-NEXT: vpshufd {{.*#+}} ymm1 = ymm1[0,1,0,1,4,5,4,5] |
| Chandler Carruth | a41dceb | 2014-09-30 22:04:45 +0000 | [diff] [blame] | 1412 | ; ALL-NEXT: vpblendd {{.*#+}} ymm0 = ymm0[0,1],ymm1[2,3,4,5,6,7] |
| Chandler Carruth | 9f4d9fa | 2014-10-05 11:41:36 +0000 | [diff] [blame] | 1413 | ; ALL-NEXT: vinserti64x4 $1, %ymm2, %zmm0, %zmm0 |
| Chandler Carruth | 24e3b69 | 2014-09-28 23:53:10 +0000 | [diff] [blame] | 1414 | ; ALL-NEXT: retq |
| 1415 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 6, i32 12, i32 10, i32 10, i32 8, i32 7, i32 14, i32 5> |
| 1416 | ret <8 x i64> %shuffle |
| 1417 | } |
| Adam Nemet | e5dbcb7 | 2015-01-13 22:20:18 +0000 | [diff] [blame] | 1418 | |
| Adam Nemet | f07a0ba | 2015-01-13 22:40:15 +0000 | [diff] [blame] | 1419 | define <8 x double> @shuffle_v8f64_082a4c6e(<8 x double> %a, <8 x double> %b) { |
| 1420 | ; ALL-LABEL: shuffle_v8f64_082a4c6e: |
| Adam Nemet | e5dbcb7 | 2015-01-13 22:20:18 +0000 | [diff] [blame] | 1421 | ; ALL: # BB#0: |
| 1422 | ; ALL-NEXT: vunpcklpd {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[2],zmm1[2],zmm0[4],zmm1[4],zmm0[6],zmm1[6] |
| 1423 | ; ALL-NEXT: retq |
| 1424 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32><i32 0, i32 8, i32 2, i32 10, i32 4, i32 12, i32 6, i32 14> |
| 1425 | ret <8 x double> %shuffle |
| 1426 | } |
| 1427 | |
| Adam Nemet | f07a0ba | 2015-01-13 22:40:15 +0000 | [diff] [blame] | 1428 | define <8 x i64> @shuffle_v8i64_082a4c6e(<8 x i64> %a, <8 x i64> %b) { |
| 1429 | ; ALL-LABEL: shuffle_v8i64_082a4c6e: |
| Adam Nemet | e5dbcb7 | 2015-01-13 22:20:18 +0000 | [diff] [blame] | 1430 | ; ALL: # BB#0: |
| 1431 | ; ALL-NEXT: vpunpcklqdq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[2],zmm1[2],zmm0[4],zmm1[4],zmm0[6],zmm1[6] |
| 1432 | ; ALL-NEXT: retq |
| 1433 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32><i32 0, i32 8, i32 2, i32 10, i32 4, i32 12, i32 6, i32 14> |
| 1434 | ret <8 x i64> %shuffle |
| 1435 | } |
| 1436 | |
| Adam Nemet | f07a0ba | 2015-01-13 22:40:15 +0000 | [diff] [blame] | 1437 | define <8 x double> @shuffle_v8f64_193b5d7f(<8 x double> %a, <8 x double> %b) { |
| 1438 | ; ALL-LABEL: shuffle_v8f64_193b5d7f: |
| Adam Nemet | e5dbcb7 | 2015-01-13 22:20:18 +0000 | [diff] [blame] | 1439 | ; ALL: # BB#0: |
| 1440 | ; ALL-NEXT: vunpckhpd {{.*#+}} zmm0 = zmm0[1],zmm1[1],zmm0[3],zmm1[3],zmm0[5],zmm1[5],zmm0[7],zmm1[7] |
| 1441 | ; ALL-NEXT: retq |
| 1442 | %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32><i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15> |
| 1443 | ret <8 x double> %shuffle |
| 1444 | } |
| 1445 | |
| Adam Nemet | f07a0ba | 2015-01-13 22:40:15 +0000 | [diff] [blame] | 1446 | define <8 x i64> @shuffle_v8i64_193b5d7f(<8 x i64> %a, <8 x i64> %b) { |
| 1447 | ; ALL-LABEL: shuffle_v8i64_193b5d7f: |
| Adam Nemet | e5dbcb7 | 2015-01-13 22:20:18 +0000 | [diff] [blame] | 1448 | ; ALL: # BB#0: |
| 1449 | ; ALL-NEXT: vpunpckhqdq {{.*#+}} zmm0 = zmm0[1],zmm1[1],zmm0[3],zmm1[3],zmm0[5],zmm1[5],zmm0[7],zmm1[7] |
| 1450 | ; ALL-NEXT: retq |
| 1451 | %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32><i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15> |
| 1452 | ret <8 x i64> %shuffle |
| 1453 | } |