llvm.org GIT mirror llvm / 66251d4
[X86][AVX512] Add support for lowering shuffles to VPERMILPS git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274458 91177308-0d34-0410-b5e6-96231b3b80d8 Simon Pilgrim 4 years ago
2 changed file(s) with 31 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
1176411764 return DAG.getNode(X86ISD::MOVSLDUP, DL, MVT::v16f32, V1);
1176511765 if (isShuffleEquivalent(V1, V2, RepeatedMask, {1, 1, 3, 3}))
1176611766 return DAG.getNode(X86ISD::MOVSHDUP, DL, MVT::v16f32, V1);
11767
11768 if (V2.isUndef())
11769 return DAG.getNode(X86ISD::VPERMILPI, DL, MVT::v16f32, V1,
11770 getV4X86ShuffleImm8ForMask(RepeatedMask, DL, DAG));
1176711771 }
1176811772
1176911773 if (SDValue Unpck =
103103 ; ALL-NEXT: vmovshdup {{.*#+}} zmm0 = zmm0[1,1,3,3,5,5,7,7,9,9,11,11,13,13,15,15]
104104 ; ALL-NEXT: retq
105105 %shuffle = shufflevector <16 x float> %a, <16 x float> %b, <16 x i32>
106 ret <16 x float> %shuffle
107 }
108
109 define <16 x float> @shuffle_v16f32_00_01_00_01_06_07_06_07_08_09_10_11_12_13_12_13(<16 x float> %a, <16 x float> %b) {
110 ; ALL-LABEL: shuffle_v16f32_00_01_00_01_06_07_06_07_08_09_10_11_12_13_12_13:
111 ; ALL: # BB#0:
112 ; ALL-NEXT: vpermilpd {{.*#+}} zmm0 = zmm0[0,0,3,3,4,5,6,6]
113 ; ALL-NEXT: retq
114 %shuffle = shufflevector <16 x float> %a, <16 x float> %b, <16 x i32>
115 ret <16 x float> %shuffle
116 }
117
118 define <16 x float> @shuffle_v16f32_00_00_02_00_04_04_06_04_08_08_10_08_12_12_14_12(<16 x float> %a, <16 x float> %b) {
119 ; ALL-LABEL: shuffle_v16f32_00_00_02_00_04_04_06_04_08_08_10_08_12_12_14_12:
120 ; ALL: # BB#0:
121 ; ALL-NEXT: vpermilps {{.*#+}} zmm0 = zmm0[0,0,2,0,4,4,6,4,8,8,10,8,12,12,14,12]
122 ; ALL-NEXT: retq
123 %shuffle = shufflevector <16 x float> %a, <16 x float> %b, <16 x i32>
124 ret <16 x float> %shuffle
125 }
126
127 define <16 x float> @shuffle_v16f32_03_uu_uu_uu_uu_04_uu_uu_uu_uu_11_uu_uu_uu_uu_12(<16 x float> %a, <16 x float> %b) {
128 ; ALL-LABEL: shuffle_v16f32_03_uu_uu_uu_uu_04_uu_uu_uu_uu_11_uu_uu_uu_uu_12:
129 ; ALL: # BB#0:
130 ; ALL-NEXT: vpermilps {{.*#+}} zmm0 = zmm0[3,0,3,0,7,4,7,4,11,8,11,8,15,12,15,12]
131 ; ALL-NEXT: retq
132 %shuffle = shufflevector <16 x float> %a, <16 x float> %b, <16 x i32>
106133 ret <16 x float> %shuffle
107134 }
108135