From 2ad69eea8d45fc212b06d7da54cadf1196e54415 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Sat, 2 Aug 2014 10:08:17 +0000 Subject: [PATCH] [x86] Teach my pshufb comment printer to handle VPSHUFB forms as well as PSHUFB forms. This will be important to update some AVX tests when I add PSHUFB combining. llvm-svn: 214624 --- llvm/lib/Target/X86/X86MCInstLower.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/llvm/lib/Target/X86/X86MCInstLower.cpp b/llvm/lib/Target/X86/X86MCInstLower.cpp index febf821..a2bee7a 100644 --- a/llvm/lib/Target/X86/X86MCInstLower.cpp +++ b/llvm/lib/Target/X86/X86MCInstLower.cpp @@ -968,6 +968,7 @@ void X86AsmPrinter::EmitInstruction(const MachineInstr *MI) { return; case X86::PSHUFBrm: + case X86::VPSHUFBrm: // Lower PSHUFB normally but add a comment if we can find a constant // shuffle mask. We won't be able to do this at the MC layer because the // mask isn't an immediate. @@ -975,8 +976,8 @@ void X86AsmPrinter::EmitInstruction(const MachineInstr *MI) { raw_string_ostream CS(Comment); SmallVector Mask; - assert(MI->getNumOperands() == 7 && - "Wrong number of operansd for PSHUFBrm"); + assert(MI->getNumOperands() >= 6 && + "Wrong number of operansd for PSHUFBrm or VPSHUFBrm"); const MachineOperand &DstOp = MI->getOperand(0); const MachineOperand &SrcOp = MI->getOperand(1); const MachineOperand &MaskOp = MI->getOperand(5); -- 2.7.4