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