llvm.org GIT mirror llvm / f267972
Fix shuffle decoding for memory forms for (V)SHUFPS/D. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145392 91177308-0d34-0410-b5e6-96231b3b80d8 Craig Topper 8 years ago
2 changed file(s) with 30 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
162162 Src2Name = getRegName(MI->getOperand(2).getReg());
163163 // FALL THROUGH.
164164 case X86::SHUFPDrmi:
165 DecodeSHUFPMask(MVT::v2f64, MI->getOperand(3).getImm(), ShuffleMask);
165 DecodeSHUFPMask(MVT::v2f64, MI->getOperand(MI->getNumOperands()-1).getImm(),
166 ShuffleMask);
166167 Src1Name = getRegName(MI->getOperand(0).getReg());
167168 break;
168169 case X86::VSHUFPDrri:
169170 Src2Name = getRegName(MI->getOperand(2).getReg());
170171 // FALL THROUGH.
171172 case X86::VSHUFPDrmi:
172 DecodeSHUFPMask(MVT::v2f64, MI->getOperand(3).getImm(), ShuffleMask);
173 DecodeSHUFPMask(MVT::v2f64, MI->getOperand(MI->getNumOperands()-1).getImm(),
174 ShuffleMask);
173175 Src1Name = getRegName(MI->getOperand(1).getReg());
174176 DestName = getRegName(MI->getOperand(0).getReg());
175177 break;
177179 Src2Name = getRegName(MI->getOperand(2).getReg());
178180 // FALL THROUGH.
179181 case X86::VSHUFPDYrmi:
180 DecodeSHUFPMask(MVT::v4f64, MI->getOperand(3).getImm(), ShuffleMask);
182 DecodeSHUFPMask(MVT::v4f64, MI->getOperand(MI->getNumOperands()-1).getImm(),
183 ShuffleMask);
181184 Src1Name = getRegName(MI->getOperand(1).getReg());
182185 DestName = getRegName(MI->getOperand(0).getReg());
183186 break;
186189 Src2Name = getRegName(MI->getOperand(2).getReg());
187190 // FALL THROUGH.
188191 case X86::SHUFPSrmi:
189 DecodeSHUFPMask(MVT::v4f32, MI->getOperand(3).getImm(), ShuffleMask);
192 DecodeSHUFPMask(MVT::v4f32, MI->getOperand(MI->getNumOperands()-1).getImm(),
193 ShuffleMask);
190194 Src1Name = getRegName(MI->getOperand(0).getReg());
191195 break;
192196 case X86::VSHUFPSrri:
193197 Src2Name = getRegName(MI->getOperand(2).getReg());
194198 // FALL THROUGH.
195199 case X86::VSHUFPSrmi:
196 DecodeSHUFPMask(MVT::v4f32, MI->getOperand(3).getImm(), ShuffleMask);
200 DecodeSHUFPMask(MVT::v4f32, MI->getOperand(MI->getNumOperands()-1).getImm(),
201 ShuffleMask);
197202 Src1Name = getRegName(MI->getOperand(1).getReg());
198203 DestName = getRegName(MI->getOperand(0).getReg());
199204 break;
201206 Src2Name = getRegName(MI->getOperand(2).getReg());
202207 // FALL THROUGH.
203208 case X86::VSHUFPSYrmi:
204 DecodeSHUFPMask(MVT::v8f32, MI->getOperand(3).getImm(), ShuffleMask);
209 DecodeSHUFPMask(MVT::v8f32, MI->getOperand(MI->getNumOperands()-1).getImm(),
210 ShuffleMask);
205211 Src1Name = getRegName(MI->getOperand(1).getReg());
206212 DestName = getRegName(MI->getOperand(0).getReg());
207213 break;
66 ret <8 x float> %shuffle
77 }
88
9 ; CHECK: vshufps $-53, (%
10 define <8 x float> @A2(<8 x float>* %a, <8 x float>* %b) nounwind uwtable readnone ssp {
11 entry:
12 %a2 = load <8 x float>* %a
13 %b2 = load <8 x float>* %b
14 %shuffle = shufflevector <8 x float> %a2, <8 x float> %b2, <8 x i32>
15 ret <8 x float> %shuffle
16 }
17
918 ; CHECK: vshufpd $10, %ymm
1019 define <4 x double> @B(<4 x double> %a, <4 x double> %b) nounwind uwtable readnone ssp {
1120 entry:
1221 %shuffle = shufflevector <4 x double> %a, <4 x double> %b, <4 x i32>
22 ret <4 x double> %shuffle
23 }
24
25 ; CHECK: vshufpd $10, (%
26 define <4 x double> @B2(<4 x double>* %a, <4 x double>* %b) nounwind uwtable readnone ssp {
27 entry:
28 %a2 = load <4 x double>* %a
29 %b2 = load <4 x double>* %b
30 %shuffle = shufflevector <4 x double> %a2, <4 x double> %b2, <4 x i32>
1331 ret <4 x double> %shuffle
1432 }
1533