Index: lib/Target/X86/X86MCInstLower.cpp =================================================================== --- lib/Target/X86/X86MCInstLower.cpp +++ lib/Target/X86/X86MCInstLower.cpp @@ -1361,6 +1361,52 @@ } } +static void printConstantPoolOp(MCStreamer &OutStreamer, + const MachineInstr *MI, + StringRef Op, unsigned EltSize, + bool EOL) { + if (!OutStreamer.isVerboseAsm()) + return; + + const MCInstrDesc &Desc = MI->getDesc(); + int MemOperand = X86II::getOperandBias(Desc) + + X86II::getMemoryOperandNo(Desc.TSFlags); + const MachineOperand &MemOp = MI->getOperand(MemOperand + 3); + + auto *C = getConstantFromPool(*MI, MemOp); + if (!C) + return; + + SmallVector Vec; + APInt UndefElts; + if (!extractConstantMask(C, EltSize, UndefElts, Vec)) + return; + + const MachineOperand &DstOp = MI->getOperand(0); + const MachineOperand &SrcOp = MI->getOperand(Desc.getNumDefs()); + + std::string Comment; + raw_string_ostream CS(Comment); + + CS << X86ATTInstPrinter::getRegisterName(DstOp.getReg()); + CS << " = "; + CS << X86ATTInstPrinter::getRegisterName(SrcOp.getReg()); + CS << Op << "["; + + for (unsigned i = 0; i < Vec.size(); ++i) { + if (i != 0) + CS << ","; + if (UndefElts[i]) + CS << 'u'; + else + CS << Vec[i]; + } + + CS << "]"; + + OutStreamer.AddComment(CS.str(), EOL); +} + void X86AsmPrinter::EmitInstruction(const MachineInstr *MI) { X86MCInstLower MCInstLowering(*MF, *this); const X86RegisterInfo *RI = MF->getSubtarget().getRegisterInfo(); @@ -1764,6 +1810,144 @@ break; } + case X86::PADDBrm: + case X86::VPADDBrm: + case X86::VPADDBYrm: + case X86::VPADDBZ128rm: + case X86::VPADDBZ256rm: + case X86::VPADDBZrm: + printConstantPoolOp(*OutStreamer, MI, " + ", 8, !EnablePrintSchedInfo); + break; + case X86::PSUBBrm: + case X86::VPSUBBrm: + case X86::VPSUBBYrm: + case X86::VPSUBBZ128rm: + case X86::VPSUBBZ256rm: + case X86::VPSUBBZrm: + printConstantPoolOp(*OutStreamer, MI, " - ", 8, !EnablePrintSchedInfo); + break; + + case X86::PADDWrm: + case X86::VPADDWrm: + case X86::VPADDWYrm: + case X86::VPADDWZ128rm: + case X86::VPADDWZ256rm: + case X86::VPADDWZrm: + printConstantPoolOp(*OutStreamer, MI, " + ", 16, !EnablePrintSchedInfo); + break; + case X86::PSUBWrm: + case X86::VPSUBWrm: + case X86::VPSUBWYrm: + case X86::VPSUBWZ128rm: + case X86::VPSUBWZ256rm: + case X86::VPSUBWZrm: + printConstantPoolOp(*OutStreamer, MI, " - ", 16, !EnablePrintSchedInfo); + break; + + case X86::PADDDrm: + case X86::VPADDDrm: + case X86::VPADDDYrm: + case X86::VPADDDZ128rm: + case X86::VPADDDZ256rm: + case X86::VPADDDZrm: + printConstantPoolOp(*OutStreamer, MI, " + ", 32, !EnablePrintSchedInfo); + break; + case X86::PSUBDrm: + case X86::VPSUBDrm: + case X86::VPSUBDYrm: + case X86::VPSUBDZ128rm: + case X86::VPSUBDZ256rm: + case X86::VPSUBDZrm: + printConstantPoolOp(*OutStreamer, MI, " - ", 32, !EnablePrintSchedInfo); + break; + + case X86::PADDQrm: + case X86::VPADDQrm: + case X86::VPADDQYrm: + case X86::VPADDQZ128rm: + case X86::VPADDQZ256rm: + case X86::VPADDQZrm: + printConstantPoolOp(*OutStreamer, MI, " + ", 64, !EnablePrintSchedInfo); + break; + case X86::PSUBQrm: + case X86::VPSUBQrm: + case X86::VPSUBQYrm: + case X86::VPSUBQZ128rm: + case X86::VPSUBQZ256rm: + case X86::VPSUBQZrm: + printConstantPoolOp(*OutStreamer, MI, " - ", 64, !EnablePrintSchedInfo); + break; + + case X86::ANDPDrm: + case X86::VANDPDrm: + case X86::VANDPDYrm: + case X86::VANDPDZ128rm: + case X86::VANDPDZ256rm: + case X86::VANDPDZrm: + case X86::ANDPSrm: + case X86::VANDPSrm: + case X86::VANDPSYrm: + case X86::VANDPSZ128rm: + case X86::VANDPSZ256rm: + case X86::VANDPSZrm: + case X86::PANDrm: + case X86::VPANDrm: + case X86::VPANDYrm: + case X86::VPANDDZ128rm: + case X86::VPANDDZ256rm: + case X86::VPANDDZrm: + case X86::VPANDQZ128rm: + case X86::VPANDQZ256rm: + case X86::VPANDQZrm: + printConstantPoolOp(*OutStreamer, MI, " & ", 8, !EnablePrintSchedInfo); + break; + case X86::ORPDrm: + case X86::VORPDrm: + case X86::VORPDYrm: + case X86::VORPDZ128rm: + case X86::VORPDZ256rm: + case X86::VORPDZrm: + case X86::ORPSrm: + case X86::VORPSrm: + case X86::VORPSYrm: + case X86::VORPSZ128rm: + case X86::VORPSZ256rm: + case X86::VORPSZrm: + case X86::PORrm: + case X86::VPORrm: + case X86::VPORYrm: + case X86::VPORDZ128rm: + case X86::VPORDZ256rm: + case X86::VPORDZrm: + case X86::VPORQZ128rm: + case X86::VPORQZ256rm: + case X86::VPORQZrm: + printConstantPoolOp(*OutStreamer, MI, " | ", 8, !EnablePrintSchedInfo); + break; + case X86::XORPDrm: + case X86::VXORPDrm: + case X86::VXORPDYrm: + case X86::VXORPDZ128rm: + case X86::VXORPDZ256rm: + case X86::VXORPDZrm: + case X86::XORPSrm: + case X86::VXORPSrm: + case X86::VXORPSYrm: + case X86::VXORPSZ128rm: + case X86::VXORPSZ256rm: + case X86::VXORPSZrm: + case X86::PXORrm: + case X86::VPXORrm: + case X86::VPXORYrm: + case X86::VPXORDZ128rm: + case X86::VPXORDZ256rm: + case X86::VPXORDZrm: + case X86::VPXORQZ128rm: + case X86::VPXORQZ256rm: + case X86::VPXORQZrm: + printConstantPoolOp(*OutStreamer, MI, " ^ ", 8, !EnablePrintSchedInfo); + break; + #define MOV_CASE(Prefix, Suffix) \ case X86::Prefix##MOVAPD##Suffix##rm: \ case X86::Prefix##MOVAPS##Suffix##rm: \ Index: lib/Target/X86/X86ShuffleDecodeConstantPool.h =================================================================== --- lib/Target/X86/X86ShuffleDecodeConstantPool.h +++ lib/Target/X86/X86ShuffleDecodeConstantPool.h @@ -15,6 +15,7 @@ #ifndef LLVM_LIB_TARGET_X86_X86SHUFFLEDECODECONSTANTPOOL_H #define LLVM_LIB_TARGET_X86_X86SHUFFLEDECODECONSTANTPOOL_H +#include "llvm/ADT/APInt.h" #include "llvm/ADT/SmallVector.h" //===----------------------------------------------------------------------===// @@ -25,6 +26,11 @@ class Constant; class MVT; +// Extract a constant vector into an array of uint64_ts. +bool extractConstantMask(const Constant *C, unsigned MaskEltSizeInBits, + APInt &UndefElts, + SmallVectorImpl &RawMask); + /// Decode a PSHUFB mask from an IR-level vector constant. void DecodePSHUFBMask(const Constant *C, SmallVectorImpl &ShuffleMask); Index: lib/Target/X86/X86ShuffleDecodeConstantPool.cpp =================================================================== --- lib/Target/X86/X86ShuffleDecodeConstantPool.cpp +++ lib/Target/X86/X86ShuffleDecodeConstantPool.cpp @@ -24,9 +24,9 @@ namespace llvm { -static bool extractConstantMask(const Constant *C, unsigned MaskEltSizeInBits, - APInt &UndefElts, - SmallVectorImpl &RawMask) { +bool extractConstantMask(const Constant *C, unsigned MaskEltSizeInBits, + APInt &UndefElts, + SmallVectorImpl &RawMask) { // It is not an error for shuffle masks to not be a vector of // MaskEltSizeInBits because the constant pool uniques constants by their // bit representation. Index: test/CodeGen/X86/vector-shift-shl-128.ll =================================================================== --- test/CodeGen/X86/vector-shift-shl-128.ll +++ test/CodeGen/X86/vector-shift-shl-128.ll @@ -87,7 +87,7 @@ ; SSE2-LABEL: var_shift_v4i32: ; SSE2: # BB#0: ; SSE2-NEXT: pslld $23, %xmm1 -; SSE2-NEXT: paddd {{.*}}(%rip), %xmm1 +; SSE2-NEXT: paddd {{.*#+}} xmm1 = xmm1 + [1065353216,1065353216,1065353216,1065353216] ; SSE2-NEXT: cvttps2dq %xmm1, %xmm1 ; SSE2-NEXT: pshufd {{.*#+}} xmm2 = xmm1[1,1,3,3] ; SSE2-NEXT: pmuludq %xmm0, %xmm1 @@ -102,7 +102,7 @@ ; SSE41-LABEL: var_shift_v4i32: ; SSE41: # BB#0: ; SSE41-NEXT: pslld $23, %xmm1 -; SSE41-NEXT: paddd {{.*}}(%rip), %xmm1 +; SSE41-NEXT: paddd {{.*#+}} xmm1 = xmm1 + [1065353216,1065353216,1065353216,1065353216] ; SSE41-NEXT: cvttps2dq %xmm1, %xmm1 ; SSE41-NEXT: pmulld %xmm1, %xmm0 ; SSE41-NEXT: retq @@ -110,7 +110,7 @@ ; AVX1-LABEL: var_shift_v4i32: ; AVX1: # BB#0: ; AVX1-NEXT: vpslld $23, %xmm1, %xmm1 -; AVX1-NEXT: vpaddd {{.*}}(%rip), %xmm1, %xmm1 +; AVX1-NEXT: vpaddd {{.*#+}} xmm1 = xmm1 + [1065353216,1065353216,1065353216,1065353216] ; AVX1-NEXT: vcvttps2dq %xmm1, %xmm1 ; AVX1-NEXT: vpmulld %xmm0, %xmm1, %xmm0 ; AVX1-NEXT: retq @@ -143,7 +143,7 @@ ; X32-SSE-LABEL: var_shift_v4i32: ; X32-SSE: # BB#0: ; X32-SSE-NEXT: pslld $23, %xmm1 -; X32-SSE-NEXT: paddd {{\.LCPI.*}}, %xmm1 +; X32-SSE-NEXT: paddd {{.*#+}} xmm1 = xmm1 + [1065353216,1065353216,1065353216,1065353216] ; X32-SSE-NEXT: cvttps2dq %xmm1, %xmm1 ; X32-SSE-NEXT: pshufd {{.*#+}} xmm2 = xmm1[1,1,3,3] ; X32-SSE-NEXT: pmuludq %xmm0, %xmm1 @@ -336,7 +336,7 @@ ; SSE2-NEXT: movdqa %xmm3, %xmm4 ; SSE2-NEXT: pandn %xmm0, %xmm4 ; SSE2-NEXT: psllw $4, %xmm0 -; SSE2-NEXT: pand {{.*}}(%rip), %xmm0 +; SSE2-NEXT: pand {{.*#+}} xmm0 = xmm0 & [240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240] ; SSE2-NEXT: pand %xmm3, %xmm0 ; SSE2-NEXT: por %xmm4, %xmm0 ; SSE2-NEXT: paddb %xmm1, %xmm1 @@ -345,7 +345,7 @@ ; SSE2-NEXT: movdqa %xmm3, %xmm4 ; SSE2-NEXT: pandn %xmm0, %xmm4 ; SSE2-NEXT: psllw $2, %xmm0 -; SSE2-NEXT: pand {{.*}}(%rip), %xmm0 +; SSE2-NEXT: pand {{.*#+}} xmm0 = xmm0 & [252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252] ; SSE2-NEXT: pand %xmm3, %xmm0 ; SSE2-NEXT: por %xmm4, %xmm0 ; SSE2-NEXT: paddb %xmm1, %xmm1 @@ -363,12 +363,12 @@ ; SSE41-NEXT: psllw $5, %xmm1 ; SSE41-NEXT: movdqa %xmm2, %xmm3 ; SSE41-NEXT: psllw $4, %xmm3 -; SSE41-NEXT: pand {{.*}}(%rip), %xmm3 +; SSE41-NEXT: pand {{.*#+}} xmm3 = xmm3 & [240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240] ; SSE41-NEXT: movdqa %xmm1, %xmm0 ; SSE41-NEXT: pblendvb %xmm0, %xmm3, %xmm2 ; SSE41-NEXT: movdqa %xmm2, %xmm3 ; SSE41-NEXT: psllw $2, %xmm3 -; SSE41-NEXT: pand {{.*}}(%rip), %xmm3 +; SSE41-NEXT: pand {{.*#+}} xmm3 = xmm3 & [252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252] ; SSE41-NEXT: paddb %xmm1, %xmm1 ; SSE41-NEXT: movdqa %xmm1, %xmm0 ; SSE41-NEXT: pblendvb %xmm0, %xmm3, %xmm2 @@ -384,10 +384,10 @@ ; AVX: # BB#0: ; AVX-NEXT: vpsllw $5, %xmm1, %xmm1 ; AVX-NEXT: vpsllw $4, %xmm0, %xmm2 -; AVX-NEXT: vpand {{.*}}(%rip), %xmm2, %xmm2 +; AVX-NEXT: vpand {{.*#+}} xmm2 = xmm2 & [240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240] ; AVX-NEXT: vpblendvb %xmm1, %xmm2, %xmm0, %xmm0 ; AVX-NEXT: vpsllw $2, %xmm0, %xmm2 -; AVX-NEXT: vpand {{.*}}(%rip), %xmm2, %xmm2 +; AVX-NEXT: vpand {{.*#+}} xmm2 = xmm2 & [252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252] ; AVX-NEXT: vpaddb %xmm1, %xmm1, %xmm1 ; AVX-NEXT: vpblendvb %xmm1, %xmm2, %xmm0, %xmm0 ; AVX-NEXT: vpaddb %xmm0, %xmm0, %xmm2 @@ -425,7 +425,7 @@ ; X32-SSE-NEXT: movdqa %xmm3, %xmm4 ; X32-SSE-NEXT: pandn %xmm0, %xmm4 ; X32-SSE-NEXT: psllw $4, %xmm0 -; X32-SSE-NEXT: pand {{\.LCPI.*}}, %xmm0 +; X32-SSE-NEXT: pand {{.*#+}} xmm0 = xmm0 & [240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240] ; X32-SSE-NEXT: pand %xmm3, %xmm0 ; X32-SSE-NEXT: por %xmm4, %xmm0 ; X32-SSE-NEXT: paddb %xmm1, %xmm1 @@ -434,7 +434,7 @@ ; X32-SSE-NEXT: movdqa %xmm3, %xmm4 ; X32-SSE-NEXT: pandn %xmm0, %xmm4 ; X32-SSE-NEXT: psllw $2, %xmm0 -; X32-SSE-NEXT: pand {{\.LCPI.*}}, %xmm0 +; X32-SSE-NEXT: pand {{.*#+}} xmm0 = xmm0 & [252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252] ; X32-SSE-NEXT: pand %xmm3, %xmm0 ; X32-SSE-NEXT: por %xmm4, %xmm0 ; X32-SSE-NEXT: paddb %xmm1, %xmm1 @@ -599,7 +599,7 @@ ; SSE2-NEXT: movdqa %xmm3, %xmm4 ; SSE2-NEXT: pandn %xmm0, %xmm4 ; SSE2-NEXT: psllw $4, %xmm0 -; SSE2-NEXT: pand {{.*}}(%rip), %xmm0 +; SSE2-NEXT: pand {{.*#+}} xmm0 = xmm0 & [240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240] ; SSE2-NEXT: pand %xmm3, %xmm0 ; SSE2-NEXT: por %xmm4, %xmm0 ; SSE2-NEXT: paddb %xmm2, %xmm2 @@ -608,7 +608,7 @@ ; SSE2-NEXT: movdqa %xmm3, %xmm4 ; SSE2-NEXT: pandn %xmm0, %xmm4 ; SSE2-NEXT: psllw $2, %xmm0 -; SSE2-NEXT: pand {{.*}}(%rip), %xmm0 +; SSE2-NEXT: pand {{.*#+}} xmm0 = xmm0 & [252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252] ; SSE2-NEXT: pand %xmm3, %xmm0 ; SSE2-NEXT: por %xmm4, %xmm0 ; SSE2-NEXT: paddb %xmm2, %xmm2 @@ -630,12 +630,12 @@ ; SSE41-NEXT: paddb %xmm3, %xmm3 ; SSE41-NEXT: movdqa %xmm2, %xmm4 ; SSE41-NEXT: psllw $4, %xmm4 -; SSE41-NEXT: pand {{.*}}(%rip), %xmm4 +; SSE41-NEXT: pand {{.*#+}} xmm4 = xmm4 & [240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240] ; SSE41-NEXT: movdqa %xmm1, %xmm0 ; SSE41-NEXT: pblendvb %xmm0, %xmm4, %xmm2 ; SSE41-NEXT: movdqa %xmm2, %xmm1 ; SSE41-NEXT: psllw $2, %xmm1 -; SSE41-NEXT: pand {{.*}}(%rip), %xmm1 +; SSE41-NEXT: pand {{.*#+}} xmm1 = xmm1 & [252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252] ; SSE41-NEXT: movdqa %xmm3, %xmm0 ; SSE41-NEXT: pblendvb %xmm0, %xmm1, %xmm2 ; SSE41-NEXT: movdqa %xmm2, %xmm1 @@ -653,10 +653,10 @@ ; AVX1-NEXT: vpsllw $5, %xmm1, %xmm1 ; AVX1-NEXT: vpaddb %xmm1, %xmm1, %xmm2 ; AVX1-NEXT: vpsllw $4, %xmm0, %xmm3 -; AVX1-NEXT: vpand {{.*}}(%rip), %xmm3, %xmm3 +; AVX1-NEXT: vpand {{.*#+}} xmm3 = xmm3 & [240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240] ; AVX1-NEXT: vpblendvb %xmm1, %xmm3, %xmm0, %xmm0 ; AVX1-NEXT: vpsllw $2, %xmm0, %xmm1 -; AVX1-NEXT: vpand {{.*}}(%rip), %xmm1, %xmm1 +; AVX1-NEXT: vpand {{.*#+}} xmm1 = xmm1 & [252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252] ; AVX1-NEXT: vpblendvb %xmm2, %xmm1, %xmm0, %xmm0 ; AVX1-NEXT: vpaddb %xmm0, %xmm0, %xmm1 ; AVX1-NEXT: vpaddb %xmm2, %xmm2, %xmm2 @@ -668,10 +668,10 @@ ; AVX2-NEXT: vpbroadcastb %xmm1, %xmm1 ; AVX2-NEXT: vpsllw $5, %xmm1, %xmm1 ; AVX2-NEXT: vpsllw $4, %xmm0, %xmm2 -; AVX2-NEXT: vpand {{.*}}(%rip), %xmm2, %xmm2 +; AVX2-NEXT: vpand {{.*#+}} xmm2 = xmm2 & [240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240] ; AVX2-NEXT: vpblendvb %xmm1, %xmm2, %xmm0, %xmm0 ; AVX2-NEXT: vpsllw $2, %xmm0, %xmm2 -; AVX2-NEXT: vpand {{.*}}(%rip), %xmm2, %xmm2 +; AVX2-NEXT: vpand {{.*#+}} xmm2 = xmm2 & [252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252] ; AVX2-NEXT: vpaddb %xmm1, %xmm1, %xmm1 ; AVX2-NEXT: vpblendvb %xmm1, %xmm2, %xmm0, %xmm0 ; AVX2-NEXT: vpaddb %xmm0, %xmm0, %xmm2 @@ -722,7 +722,7 @@ ; X32-SSE-NEXT: movdqa %xmm3, %xmm4 ; X32-SSE-NEXT: pandn %xmm0, %xmm4 ; X32-SSE-NEXT: psllw $4, %xmm0 -; X32-SSE-NEXT: pand {{\.LCPI.*}}, %xmm0 +; X32-SSE-NEXT: pand {{.*#+}} xmm0 = xmm0 & [240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240] ; X32-SSE-NEXT: pand %xmm3, %xmm0 ; X32-SSE-NEXT: por %xmm4, %xmm0 ; X32-SSE-NEXT: paddb %xmm2, %xmm2 @@ -731,7 +731,7 @@ ; X32-SSE-NEXT: movdqa %xmm3, %xmm4 ; X32-SSE-NEXT: pandn %xmm0, %xmm4 ; X32-SSE-NEXT: psllw $2, %xmm0 -; X32-SSE-NEXT: pand {{\.LCPI.*}}, %xmm0 +; X32-SSE-NEXT: pand {{.*#+}} xmm0 = xmm0 & [252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252] ; X32-SSE-NEXT: pand %xmm3, %xmm0 ; X32-SSE-NEXT: por %xmm4, %xmm0 ; X32-SSE-NEXT: paddb %xmm2, %xmm2 @@ -933,7 +933,7 @@ ; SSE2-NEXT: movdqa %xmm3, %xmm4 ; SSE2-NEXT: pandn %xmm0, %xmm4 ; SSE2-NEXT: psllw $4, %xmm0 -; SSE2-NEXT: pand {{.*}}(%rip), %xmm0 +; SSE2-NEXT: pand {{.*#+}} xmm0 = xmm0 & [240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240] ; SSE2-NEXT: pand %xmm3, %xmm0 ; SSE2-NEXT: por %xmm4, %xmm0 ; SSE2-NEXT: paddb %xmm2, %xmm2 @@ -942,7 +942,7 @@ ; SSE2-NEXT: movdqa %xmm3, %xmm4 ; SSE2-NEXT: pandn %xmm0, %xmm4 ; SSE2-NEXT: psllw $2, %xmm0 -; SSE2-NEXT: pand {{.*}}(%rip), %xmm0 +; SSE2-NEXT: pand {{.*#+}} xmm0 = xmm0 & [252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252] ; SSE2-NEXT: pand %xmm3, %xmm0 ; SSE2-NEXT: por %xmm4, %xmm0 ; SSE2-NEXT: paddb %xmm2, %xmm2 @@ -959,12 +959,12 @@ ; SSE41-NEXT: movdqa %xmm0, %xmm1 ; SSE41-NEXT: movdqa %xmm1, %xmm2 ; SSE41-NEXT: psllw $4, %xmm2 -; SSE41-NEXT: pand {{.*}}(%rip), %xmm2 +; SSE41-NEXT: pand {{.*#+}} xmm2 = xmm2 & [240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240] ; SSE41-NEXT: movdqa {{.*#+}} xmm0 = [8192,24640,41088,57536,49376,32928,16480,32] ; SSE41-NEXT: pblendvb %xmm0, %xmm2, %xmm1 ; SSE41-NEXT: movdqa %xmm1, %xmm2 ; SSE41-NEXT: psllw $2, %xmm2 -; SSE41-NEXT: pand {{.*}}(%rip), %xmm2 +; SSE41-NEXT: pand {{.*#+}} xmm2 = xmm2 & [252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252] ; SSE41-NEXT: paddb %xmm0, %xmm0 ; SSE41-NEXT: pblendvb %xmm0, %xmm2, %xmm1 ; SSE41-NEXT: movdqa %xmm1, %xmm2 @@ -977,11 +977,11 @@ ; AVX-LABEL: constant_shift_v16i8: ; AVX: # BB#0: ; AVX-NEXT: vpsllw $4, %xmm0, %xmm1 -; AVX-NEXT: vpand {{.*}}(%rip), %xmm1, %xmm1 +; AVX-NEXT: vpand {{.*#+}} xmm1 = xmm1 & [240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240] ; AVX-NEXT: vmovdqa {{.*#+}} xmm2 = [8192,24640,41088,57536,49376,32928,16480,32] ; AVX-NEXT: vpblendvb %xmm2, %xmm1, %xmm0, %xmm0 ; AVX-NEXT: vpsllw $2, %xmm0, %xmm1 -; AVX-NEXT: vpand {{.*}}(%rip), %xmm1, %xmm1 +; AVX-NEXT: vpand {{.*#+}} xmm1 = xmm1 & [252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252] ; AVX-NEXT: vpaddb %xmm2, %xmm2, %xmm2 ; AVX-NEXT: vpblendvb %xmm2, %xmm1, %xmm0, %xmm0 ; AVX-NEXT: vpaddb %xmm0, %xmm0, %xmm1 @@ -1017,7 +1017,7 @@ ; X32-SSE-NEXT: movdqa %xmm3, %xmm4 ; X32-SSE-NEXT: pandn %xmm0, %xmm4 ; X32-SSE-NEXT: psllw $4, %xmm0 -; X32-SSE-NEXT: pand {{\.LCPI.*}}, %xmm0 +; X32-SSE-NEXT: pand {{.*#+}} xmm0 = xmm0 & [240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240] ; X32-SSE-NEXT: pand %xmm3, %xmm0 ; X32-SSE-NEXT: por %xmm4, %xmm0 ; X32-SSE-NEXT: paddb %xmm2, %xmm2 @@ -1026,7 +1026,7 @@ ; X32-SSE-NEXT: movdqa %xmm3, %xmm4 ; X32-SSE-NEXT: pandn %xmm0, %xmm4 ; X32-SSE-NEXT: psllw $2, %xmm0 -; X32-SSE-NEXT: pand {{\.LCPI.*}}, %xmm0 +; X32-SSE-NEXT: pand {{.*#+}} xmm0 = xmm0 & [252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252] ; X32-SSE-NEXT: pand %xmm3, %xmm0 ; X32-SSE-NEXT: por %xmm4, %xmm0 ; X32-SSE-NEXT: paddb %xmm2, %xmm2 @@ -1151,13 +1151,13 @@ ; SSE-LABEL: splatconstant_shift_v16i8: ; SSE: # BB#0: ; SSE-NEXT: psllw $3, %xmm0 -; SSE-NEXT: pand {{.*}}(%rip), %xmm0 +; SSE-NEXT: pand {{.*#+}} xmm0 = xmm0 & [248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248] ; SSE-NEXT: retq ; ; AVX-LABEL: splatconstant_shift_v16i8: ; AVX: # BB#0: ; AVX-NEXT: vpsllw $3, %xmm0, %xmm0 -; AVX-NEXT: vpand {{.*}}(%rip), %xmm0, %xmm0 +; AVX-NEXT: vpand {{.*#+}} xmm0 = xmm0 & [248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248] ; AVX-NEXT: retq ; ; XOP-LABEL: splatconstant_shift_v16i8: @@ -1168,19 +1168,19 @@ ; AVX512-LABEL: splatconstant_shift_v16i8: ; AVX512: # BB#0: ; AVX512-NEXT: vpsllw $3, %xmm0, %xmm0 -; AVX512-NEXT: vpand {{.*}}(%rip), %xmm0, %xmm0 +; AVX512-NEXT: vpand {{.*#+}} xmm0 = xmm0 & [248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248] ; AVX512-NEXT: retq ; ; AVX512VL-LABEL: splatconstant_shift_v16i8: ; AVX512VL: # BB#0: ; AVX512VL-NEXT: vpsllw $3, %xmm0, %xmm0 -; AVX512VL-NEXT: vpand {{.*}}(%rip), %xmm0, %xmm0 +; AVX512VL-NEXT: vpand {{.*#+}} xmm0 = xmm0 & [248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248] ; AVX512VL-NEXT: retq ; ; X32-SSE-LABEL: splatconstant_shift_v16i8: ; X32-SSE: # BB#0: ; X32-SSE-NEXT: psllw $3, %xmm0 -; X32-SSE-NEXT: pand {{\.LCPI.*}}, %xmm0 +; X32-SSE-NEXT: pand {{.*#+}} xmm0 = xmm0 & [248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248] ; X32-SSE-NEXT: retl %shift = shl <16 x i8> %a, ret <16 x i8> %shift Index: test/CodeGen/X86/vector-shift-shl-256.ll =================================================================== --- test/CodeGen/X86/vector-shift-shl-256.ll +++ test/CodeGen/X86/vector-shift-shl-256.ll @@ -339,10 +339,10 @@ ; AVX2: # BB#0: ; AVX2-NEXT: vpsllw $5, %ymm1, %ymm1 ; AVX2-NEXT: vpsllw $4, %ymm0, %ymm2 -; AVX2-NEXT: vpand {{.*}}(%rip), %ymm2, %ymm2 +; AVX2-NEXT: vpand {{.*#+}} ymm2 = ymm2 & [240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240] ; AVX2-NEXT: vpblendvb %ymm1, %ymm2, %ymm0, %ymm0 ; AVX2-NEXT: vpsllw $2, %ymm0, %ymm2 -; AVX2-NEXT: vpand {{.*}}(%rip), %ymm2, %ymm2 +; AVX2-NEXT: vpand {{.*#+}} ymm2 = ymm2 & [252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252] ; AVX2-NEXT: vpaddb %ymm1, %ymm1, %ymm1 ; AVX2-NEXT: vpblendvb %ymm1, %ymm2, %ymm0, %ymm0 ; AVX2-NEXT: vpaddb %ymm0, %ymm0, %ymm2 @@ -372,10 +372,10 @@ ; AVX512DQ: # BB#0: ; AVX512DQ-NEXT: vpsllw $5, %ymm1, %ymm1 ; AVX512DQ-NEXT: vpsllw $4, %ymm0, %ymm2 -; AVX512DQ-NEXT: vpand {{.*}}(%rip), %ymm2, %ymm2 +; AVX512DQ-NEXT: vpand {{.*#+}} ymm2 = ymm2 & [240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240] ; AVX512DQ-NEXT: vpblendvb %ymm1, %ymm2, %ymm0, %ymm0 ; AVX512DQ-NEXT: vpsllw $2, %ymm0, %ymm2 -; AVX512DQ-NEXT: vpand {{.*}}(%rip), %ymm2, %ymm2 +; AVX512DQ-NEXT: vpand {{.*#+}} ymm2 = ymm2 & [252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252] ; AVX512DQ-NEXT: vpaddb %ymm1, %ymm1, %ymm1 ; AVX512DQ-NEXT: vpblendvb %ymm1, %ymm2, %ymm0, %ymm0 ; AVX512DQ-NEXT: vpaddb %ymm0, %ymm0, %ymm2 @@ -395,10 +395,10 @@ ; AVX512DQVL: # BB#0: ; AVX512DQVL-NEXT: vpsllw $5, %ymm1, %ymm1 ; AVX512DQVL-NEXT: vpsllw $4, %ymm0, %ymm2 -; AVX512DQVL-NEXT: vpand {{.*}}(%rip), %ymm2, %ymm2 +; AVX512DQVL-NEXT: vpand {{.*#+}} ymm2 = ymm2 & [240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240] ; AVX512DQVL-NEXT: vpblendvb %ymm1, %ymm2, %ymm0, %ymm0 ; AVX512DQVL-NEXT: vpsllw $2, %ymm0, %ymm2 -; AVX512DQVL-NEXT: vpand {{.*}}(%rip), %ymm2, %ymm2 +; AVX512DQVL-NEXT: vpand {{.*#+}} ymm2 = ymm2 & [252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252] ; AVX512DQVL-NEXT: vpaddb %ymm1, %ymm1, %ymm1 ; AVX512DQVL-NEXT: vpblendvb %ymm1, %ymm2, %ymm0, %ymm0 ; AVX512DQVL-NEXT: vpaddb %ymm0, %ymm0, %ymm2 @@ -449,10 +449,10 @@ ; X32-AVX2: # BB#0: ; X32-AVX2-NEXT: vpsllw $5, %ymm1, %ymm1 ; X32-AVX2-NEXT: vpsllw $4, %ymm0, %ymm2 -; X32-AVX2-NEXT: vpand {{\.LCPI.*}}, %ymm2, %ymm2 +; X32-AVX2-NEXT: vpand {{.*#+}} ymm2 = ymm2 & [240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240] ; X32-AVX2-NEXT: vpblendvb %ymm1, %ymm2, %ymm0, %ymm0 ; X32-AVX2-NEXT: vpsllw $2, %ymm0, %ymm2 -; X32-AVX2-NEXT: vpand {{\.LCPI.*}}, %ymm2, %ymm2 +; X32-AVX2-NEXT: vpand {{.*#+}} ymm2 = ymm2 & [252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252] ; X32-AVX2-NEXT: vpaddb %ymm1, %ymm1, %ymm1 ; X32-AVX2-NEXT: vpblendvb %ymm1, %ymm2, %ymm0, %ymm0 ; X32-AVX2-NEXT: vpaddb %ymm0, %ymm0, %ymm2 @@ -679,11 +679,11 @@ ; AVX2: # BB#0: ; AVX2-NEXT: vpbroadcastb %xmm1, %ymm1 ; AVX2-NEXT: vpsllw $4, %ymm0, %ymm2 -; AVX2-NEXT: vpand {{.*}}(%rip), %ymm2, %ymm2 +; AVX2-NEXT: vpand {{.*#+}} ymm2 = ymm2 & [240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240] ; AVX2-NEXT: vpsllw $5, %ymm1, %ymm1 ; AVX2-NEXT: vpblendvb %ymm1, %ymm2, %ymm0, %ymm0 ; AVX2-NEXT: vpsllw $2, %ymm0, %ymm2 -; AVX2-NEXT: vpand {{.*}}(%rip), %ymm2, %ymm2 +; AVX2-NEXT: vpand {{.*#+}} ymm2 = ymm2 & [252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252] ; AVX2-NEXT: vpaddb %ymm1, %ymm1, %ymm1 ; AVX2-NEXT: vpblendvb %ymm1, %ymm2, %ymm0, %ymm0 ; AVX2-NEXT: vpaddb %ymm0, %ymm0, %ymm2 @@ -715,11 +715,11 @@ ; AVX512DQ: # BB#0: ; AVX512DQ-NEXT: vpbroadcastb %xmm1, %ymm1 ; AVX512DQ-NEXT: vpsllw $4, %ymm0, %ymm2 -; AVX512DQ-NEXT: vpand {{.*}}(%rip), %ymm2, %ymm2 +; AVX512DQ-NEXT: vpand {{.*#+}} ymm2 = ymm2 & [240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240] ; AVX512DQ-NEXT: vpsllw $5, %ymm1, %ymm1 ; AVX512DQ-NEXT: vpblendvb %ymm1, %ymm2, %ymm0, %ymm0 ; AVX512DQ-NEXT: vpsllw $2, %ymm0, %ymm2 -; AVX512DQ-NEXT: vpand {{.*}}(%rip), %ymm2, %ymm2 +; AVX512DQ-NEXT: vpand {{.*#+}} ymm2 = ymm2 & [252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252] ; AVX512DQ-NEXT: vpaddb %ymm1, %ymm1, %ymm1 ; AVX512DQ-NEXT: vpblendvb %ymm1, %ymm2, %ymm0, %ymm0 ; AVX512DQ-NEXT: vpaddb %ymm0, %ymm0, %ymm2 @@ -740,11 +740,11 @@ ; AVX512DQVL: # BB#0: ; AVX512DQVL-NEXT: vpbroadcastb %xmm1, %ymm1 ; AVX512DQVL-NEXT: vpsllw $4, %ymm0, %ymm2 -; AVX512DQVL-NEXT: vpand {{.*}}(%rip), %ymm2, %ymm2 +; AVX512DQVL-NEXT: vpand {{.*#+}} ymm2 = ymm2 & [240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240] ; AVX512DQVL-NEXT: vpsllw $5, %ymm1, %ymm1 ; AVX512DQVL-NEXT: vpblendvb %ymm1, %ymm2, %ymm0, %ymm0 ; AVX512DQVL-NEXT: vpsllw $2, %ymm0, %ymm2 -; AVX512DQVL-NEXT: vpand {{.*}}(%rip), %ymm2, %ymm2 +; AVX512DQVL-NEXT: vpand {{.*#+}} ymm2 = ymm2 & [252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252] ; AVX512DQVL-NEXT: vpaddb %ymm1, %ymm1, %ymm1 ; AVX512DQVL-NEXT: vpblendvb %ymm1, %ymm2, %ymm0, %ymm0 ; AVX512DQVL-NEXT: vpaddb %ymm0, %ymm0, %ymm2 @@ -794,11 +794,11 @@ ; X32-AVX2: # BB#0: ; X32-AVX2-NEXT: vpbroadcastb %xmm1, %ymm1 ; X32-AVX2-NEXT: vpsllw $4, %ymm0, %ymm2 -; X32-AVX2-NEXT: vpand {{\.LCPI.*}}, %ymm2, %ymm2 +; X32-AVX2-NEXT: vpand {{.*#+}} ymm2 = ymm2 & [240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240] ; X32-AVX2-NEXT: vpsllw $5, %ymm1, %ymm1 ; X32-AVX2-NEXT: vpblendvb %ymm1, %ymm2, %ymm0, %ymm0 ; X32-AVX2-NEXT: vpsllw $2, %ymm0, %ymm2 -; X32-AVX2-NEXT: vpand {{\.LCPI.*}}, %ymm2, %ymm2 +; X32-AVX2-NEXT: vpand {{.*#+}} ymm2 = ymm2 & [252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252] ; X32-AVX2-NEXT: vpaddb %ymm1, %ymm1, %ymm1 ; X32-AVX2-NEXT: vpblendvb %ymm1, %ymm2, %ymm0, %ymm0 ; X32-AVX2-NEXT: vpaddb %ymm0, %ymm0, %ymm2 @@ -1029,11 +1029,11 @@ ; AVX2-LABEL: constant_shift_v32i8: ; AVX2: # BB#0: ; AVX2-NEXT: vpsllw $4, %ymm0, %ymm1 -; AVX2-NEXT: vpand {{.*}}(%rip), %ymm1, %ymm1 +; AVX2-NEXT: vpand {{.*#+}} ymm1 = ymm1 & [240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240] ; AVX2-NEXT: vmovdqa {{.*#+}} ymm2 = [8192,24640,41088,57536,49376,32928,16480,32,8192,24640,41088,57536,49376,32928,16480,32] ; AVX2-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0 ; AVX2-NEXT: vpsllw $2, %ymm0, %ymm1 -; AVX2-NEXT: vpand {{.*}}(%rip), %ymm1, %ymm1 +; AVX2-NEXT: vpand {{.*#+}} ymm1 = ymm1 & [252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252] ; AVX2-NEXT: vpaddb %ymm2, %ymm2, %ymm2 ; AVX2-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0 ; AVX2-NEXT: vpaddb %ymm0, %ymm0, %ymm1 @@ -1062,11 +1062,11 @@ ; AVX512DQ-LABEL: constant_shift_v32i8: ; AVX512DQ: # BB#0: ; AVX512DQ-NEXT: vpsllw $4, %ymm0, %ymm1 -; AVX512DQ-NEXT: vpand {{.*}}(%rip), %ymm1, %ymm1 +; AVX512DQ-NEXT: vpand {{.*#+}} ymm1 = ymm1 & [240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240] ; AVX512DQ-NEXT: vmovdqa {{.*#+}} ymm2 = [8192,24640,41088,57536,49376,32928,16480,32,8192,24640,41088,57536,49376,32928,16480,32] ; AVX512DQ-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0 ; AVX512DQ-NEXT: vpsllw $2, %ymm0, %ymm1 -; AVX512DQ-NEXT: vpand {{.*}}(%rip), %ymm1, %ymm1 +; AVX512DQ-NEXT: vpand {{.*#+}} ymm1 = ymm1 & [252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252] ; AVX512DQ-NEXT: vpaddb %ymm2, %ymm2, %ymm2 ; AVX512DQ-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0 ; AVX512DQ-NEXT: vpaddb %ymm0, %ymm0, %ymm1 @@ -1084,11 +1084,11 @@ ; AVX512DQVL-LABEL: constant_shift_v32i8: ; AVX512DQVL: # BB#0: ; AVX512DQVL-NEXT: vpsllw $4, %ymm0, %ymm1 -; AVX512DQVL-NEXT: vpand {{.*}}(%rip), %ymm1, %ymm1 +; AVX512DQVL-NEXT: vpand {{.*#+}} ymm1 = ymm1 & [240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240] ; AVX512DQVL-NEXT: vmovdqa {{.*#+}} ymm2 = [8192,24640,41088,57536,49376,32928,16480,32,8192,24640,41088,57536,49376,32928,16480,32] ; AVX512DQVL-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0 ; AVX512DQVL-NEXT: vpsllw $2, %ymm0, %ymm1 -; AVX512DQVL-NEXT: vpand {{.*}}(%rip), %ymm1, %ymm1 +; AVX512DQVL-NEXT: vpand {{.*#+}} ymm1 = ymm1 & [252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252] ; AVX512DQVL-NEXT: vpaddb %ymm2, %ymm2, %ymm2 ; AVX512DQVL-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0 ; AVX512DQVL-NEXT: vpaddb %ymm0, %ymm0, %ymm1 @@ -1133,11 +1133,11 @@ ; X32-AVX2-LABEL: constant_shift_v32i8: ; X32-AVX2: # BB#0: ; X32-AVX2-NEXT: vpsllw $4, %ymm0, %ymm1 -; X32-AVX2-NEXT: vpand {{\.LCPI.*}}, %ymm1, %ymm1 +; X32-AVX2-NEXT: vpand {{.*#+}} ymm1 = ymm1 & [240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240] ; X32-AVX2-NEXT: vmovdqa {{.*#+}} ymm2 = [8192,24640,41088,57536,49376,32928,16480,32,8192,24640,41088,57536,49376,32928,16480,32] ; X32-AVX2-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0 ; X32-AVX2-NEXT: vpsllw $2, %ymm0, %ymm1 -; X32-AVX2-NEXT: vpand {{\.LCPI.*}}, %ymm1, %ymm1 +; X32-AVX2-NEXT: vpand {{.*#+}} ymm1 = ymm1 & [252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252] ; X32-AVX2-NEXT: vpaddb %ymm2, %ymm2, %ymm2 ; X32-AVX2-NEXT: vpblendvb %ymm2, %ymm1, %ymm0, %ymm0 ; X32-AVX2-NEXT: vpaddb %ymm0, %ymm0, %ymm1 @@ -1326,7 +1326,7 @@ ; AVX2-LABEL: splatconstant_shift_v32i8: ; AVX2: # BB#0: ; AVX2-NEXT: vpsllw $3, %ymm0, %ymm0 -; AVX2-NEXT: vpand {{.*}}(%rip), %ymm0, %ymm0 +; AVX2-NEXT: vpand {{.*#+}} ymm0 = ymm0 & [248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248] ; AVX2-NEXT: retq ; ; XOPAVX1-LABEL: splatconstant_shift_v32i8: @@ -1341,19 +1341,19 @@ ; XOPAVX2-LABEL: splatconstant_shift_v32i8: ; XOPAVX2: # BB#0: ; XOPAVX2-NEXT: vpsllw $3, %ymm0, %ymm0 -; XOPAVX2-NEXT: vpand {{.*}}(%rip), %ymm0, %ymm0 +; XOPAVX2-NEXT: vpand {{.*#+}} ymm0 = ymm0 & [248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248] ; XOPAVX2-NEXT: retq ; ; AVX512-LABEL: splatconstant_shift_v32i8: ; AVX512: # BB#0: ; AVX512-NEXT: vpsllw $3, %ymm0, %ymm0 -; AVX512-NEXT: vpand {{.*}}(%rip), %ymm0, %ymm0 +; AVX512-NEXT: vpand {{.*#+}} ymm0 = ymm0 & [248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248] ; AVX512-NEXT: retq ; ; AVX512VL-LABEL: splatconstant_shift_v32i8: ; AVX512VL: # BB#0: ; AVX512VL-NEXT: vpsllw $3, %ymm0, %ymm0 -; AVX512VL-NEXT: vpand {{.*}}(%rip), %ymm0, %ymm0 +; AVX512VL-NEXT: vpand {{.*#+}} ymm0 = ymm0 & [248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248] ; AVX512VL-NEXT: retq ; ; X32-AVX1-LABEL: splatconstant_shift_v32i8: @@ -1370,7 +1370,7 @@ ; X32-AVX2-LABEL: splatconstant_shift_v32i8: ; X32-AVX2: # BB#0: ; X32-AVX2-NEXT: vpsllw $3, %ymm0, %ymm0 -; X32-AVX2-NEXT: vpand {{\.LCPI.*}}, %ymm0, %ymm0 +; X32-AVX2-NEXT: vpand {{.*#+}} ymm0 = ymm0 & [248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248] ; X32-AVX2-NEXT: retl %shift = shl <32 x i8> %a, ret <32 x i8> %shift Index: test/CodeGen/X86/vector-shift-shl-512.ll =================================================================== --- test/CodeGen/X86/vector-shift-shl-512.ll +++ test/CodeGen/X86/vector-shift-shl-512.ll @@ -77,12 +77,12 @@ ; AVX512BW-LABEL: var_shift_v64i8: ; AVX512BW: # BB#0: ; AVX512BW-NEXT: vpsllw $4, %zmm0, %zmm2 -; AVX512BW-NEXT: vpandq {{.*}}(%rip), %zmm2, %zmm2 +; AVX512BW-NEXT: vpandq {{.*#+}} zmm2 = zmm2 & [240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240] ; AVX512BW-NEXT: vpsllw $5, %zmm1, %zmm1 ; AVX512BW-NEXT: vpmovb2m %zmm1, %k1 ; AVX512BW-NEXT: vmovdqu8 %zmm2, %zmm0 {%k1} ; AVX512BW-NEXT: vpsllw $2, %zmm0, %zmm2 -; AVX512BW-NEXT: vpandq {{.*}}(%rip), %zmm2, %zmm2 +; AVX512BW-NEXT: vpandq {{.*#+}} zmm2 = zmm2 & [252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252] ; AVX512BW-NEXT: vpaddb %zmm1, %zmm1, %zmm1 ; AVX512BW-NEXT: vpmovb2m %zmm1, %k1 ; AVX512BW-NEXT: vmovdqu8 %zmm2, %zmm0 {%k1} @@ -168,12 +168,12 @@ ; AVX512BW: # BB#0: ; AVX512BW-NEXT: vpbroadcastb %xmm1, %zmm1 ; AVX512BW-NEXT: vpsllw $4, %zmm0, %zmm2 -; AVX512BW-NEXT: vpandq {{.*}}(%rip), %zmm2, %zmm2 +; AVX512BW-NEXT: vpandq {{.*#+}} zmm2 = zmm2 & [240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240] ; AVX512BW-NEXT: vpsllw $5, %zmm1, %zmm1 ; AVX512BW-NEXT: vpmovb2m %zmm1, %k1 ; AVX512BW-NEXT: vmovdqu8 %zmm2, %zmm0 {%k1} ; AVX512BW-NEXT: vpsllw $2, %zmm0, %zmm2 -; AVX512BW-NEXT: vpandq {{.*}}(%rip), %zmm2, %zmm2 +; AVX512BW-NEXT: vpandq {{.*#+}} zmm2 = zmm2 & [252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252] ; AVX512BW-NEXT: vpaddb %zmm1, %zmm1, %zmm1 ; AVX512BW-NEXT: vpmovb2m %zmm1, %k1 ; AVX512BW-NEXT: vmovdqu8 %zmm2, %zmm0 {%k1} @@ -255,10 +255,10 @@ ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [8192,24640,41088,57536,49376,32928,16480,32,8192,24640,41088,57536,49376,32928,16480,32,8192,24640,41088,57536,49376,32928,16480,32,8192,24640,41088,57536,49376,32928,16480,32] ; AVX512BW-NEXT: vpmovb2m %zmm1, %k1 ; AVX512BW-NEXT: vpsllw $4, %zmm0, %zmm2 -; AVX512BW-NEXT: vpandq {{.*}}(%rip), %zmm2, %zmm2 +; AVX512BW-NEXT: vpandq {{.*#+}} zmm2 = zmm2 & [240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240] ; AVX512BW-NEXT: vmovdqu8 %zmm2, %zmm0 {%k1} ; AVX512BW-NEXT: vpsllw $2, %zmm0, %zmm2 -; AVX512BW-NEXT: vpandq {{.*}}(%rip), %zmm2, %zmm2 +; AVX512BW-NEXT: vpandq {{.*#+}} zmm2 = zmm2 & [252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252] ; AVX512BW-NEXT: vpaddb %zmm1, %zmm1, %zmm1 ; AVX512BW-NEXT: vpmovb2m %zmm1, %k1 ; AVX512BW-NEXT: vmovdqu8 %zmm2, %zmm0 {%k1} @@ -320,7 +320,7 @@ ; AVX512BW-LABEL: splatconstant_shift_v64i8: ; AVX512BW: # BB#0: ; AVX512BW-NEXT: vpsllw $3, %zmm0, %zmm0 -; AVX512BW-NEXT: vpandq {{.*}}(%rip), %zmm0, %zmm0 +; AVX512BW-NEXT: vpandq {{.*#+}} zmm0 = zmm0 & [248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248] ; AVX512BW-NEXT: retq %shift = shl <64 x i8> %a, ret <64 x i8> %shift