mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-23 14:25:07 +00:00
X86: Properly decode shuffle masks when the constant pool type is weird
It's possible for the constant pool entry for the shuffle mask to come from a completely different operation. This occurs when Constants have the same bit pattern but have different types. Make DecodePSHUFBMask tolerant of types which, after a bitcast, are appropriately sized vector types. This fixes PR22188. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225597 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1161,7 +1161,7 @@ void X86AsmPrinter::EmitInstruction(const MachineInstr *MI) {
|
||||
|
||||
if (auto *C = getConstantFromPool(*MI, MaskOp)) {
|
||||
SmallVector<int, 16> Mask;
|
||||
DecodePSHUFBMask(C, Mask);
|
||||
DecodePSHUFBMask(C, TM.getSubtargetImpl()->getDataLayout(), Mask);
|
||||
if (!Mask.empty())
|
||||
OutStreamer.AddComment(getShuffleComment(DstOp, SrcOp, Mask));
|
||||
}
|
||||
|
Reference in New Issue
Block a user