[llvm] r214624 - [x86] Teach my pshufb comment printer to handle VPSHUFB forms as well as
Chandler Carruth
chandlerc at gmail.com
Sat Aug 2 03:08:18 PDT 2014
Author: chandlerc
Date: Sat Aug 2 05:08:17 2014
New Revision: 214624
URL: http://llvm.org/viewvc/llvm-project?rev=214624&view=rev
Log:
[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.
Modified:
llvm/trunk/lib/Target/X86/X86MCInstLower.cpp
Modified: llvm/trunk/lib/Target/X86/X86MCInstLower.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86MCInstLower.cpp?rev=214624&r1=214623&r2=214624&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86MCInstLower.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86MCInstLower.cpp Sat Aug 2 05:08:17 2014
@@ -968,6 +968,7 @@ void X86AsmPrinter::EmitInstruction(cons
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(cons
raw_string_ostream CS(Comment);
SmallVector<int, 16> 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);
More information about the llvm-commits
mailing list