[llvm] [X86][CodeGen] Support folding memory broadcast in X86InstrInfo::foldMemoryOperandImpl (PR #79761)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 28 09:29:19 PST 2024


================
@@ -8341,7 +8486,10 @@ bool X86InstrInfo::unfoldMemoryOperand(
   unsigned Index = I->Flags & TB_INDEX_MASK;
   bool FoldedLoad = I->Flags & TB_FOLDED_LOAD;
   bool FoldedStore = I->Flags & TB_FOLDED_STORE;
-  bool FoldedBCast = I->Flags & TB_FOLDED_BCAST;
+  unsigned BCastType = I->Flags & TB_FOLDED_BCAST;
+  // FIXME: Support TB_BCAST_SH in getBroadcastOpcode?
+  if (BCastType == TB_BCAST_SH)
----------------
RKSimon wrote:

Why was this necessary? Should TB_BCAST_W be here as well?

https://github.com/llvm/llvm-project/pull/79761


More information about the llvm-commits mailing list