Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions llvm/include/llvm/Support/X86FoldTablesUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,12 @@ enum {
// Broadcast type.
// (stored in bits 12 - 14)
TB_BCAST_TYPE_SHIFT = TB_ALIGN_SHIFT + 3,
TB_BCAST_D = 0 << TB_BCAST_TYPE_SHIFT,
TB_BCAST_Q = 1 << TB_BCAST_TYPE_SHIFT,
TB_BCAST_SS = 2 << TB_BCAST_TYPE_SHIFT,
TB_BCAST_SD = 3 << TB_BCAST_TYPE_SHIFT,
TB_BCAST_SH = 4 << TB_BCAST_TYPE_SHIFT,
TB_BCAST_W = 0 << TB_BCAST_TYPE_SHIFT,
TB_BCAST_D = 1 << TB_BCAST_TYPE_SHIFT,
TB_BCAST_Q = 2 << TB_BCAST_TYPE_SHIFT,
TB_BCAST_SS = 3 << TB_BCAST_TYPE_SHIFT,
TB_BCAST_SD = 4 << TB_BCAST_TYPE_SHIFT,
TB_BCAST_SH = 5 << TB_BCAST_TYPE_SHIFT,
TB_BCAST_MASK = 0x7 << TB_BCAST_TYPE_SHIFT,

// Unused bits 15-16
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Target/X86/X86InstrAVX512.td
Original file line number Diff line number Diff line change
Expand Up @@ -12422,7 +12422,7 @@ multiclass GF2P8AFFINE_avx512_rmb_imm<bits<8> Op, string OpStr, SDNode OpNode,
: avx512_3Op_rm_imm8<Op, OpStr, OpNode, sched, VTI, VTI> {
let ExeDomain = VTI.ExeDomain in
defm rmbi : AVX512_maskable<Op, MRMSrcMem, VTI, (outs VTI.RC:$dst),
(ins VTI.RC:$src1, VTI.ScalarMemOp:$src2, u8imm:$src3),
(ins VTI.RC:$src1, BcstVTI.ScalarMemOp:$src2, u8imm:$src3),
OpStr, "$src3, ${src2}"#BcstVTI.BroadcastStr#", $src1",
"$src1, ${src2}"#BcstVTI.BroadcastStr#", $src3",
(OpNode (VTI.VT VTI.RC:$src1),
Expand Down
11 changes: 7 additions & 4 deletions llvm/lib/Target/X86/X86InstrFoldTables.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,12 +291,15 @@ struct X86BroadcastFoldTable {
static bool matchBroadcastSize(const X86FoldTableEntry &Entry,
unsigned BroadcastBits) {
switch (Entry.Flags & TB_BCAST_MASK) {
case TB_BCAST_SD:
case TB_BCAST_Q:
return BroadcastBits == 64;
case TB_BCAST_SS:
case TB_BCAST_W:
case TB_BCAST_SH:
return BroadcastBits == 16;
case TB_BCAST_D:
case TB_BCAST_SS:
return BroadcastBits == 32;
case TB_BCAST_Q:
case TB_BCAST_SD:
return BroadcastBits == 64;
}
return false;
}
Expand Down
Loading