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