[llvm] [X86][CodeGen] Support folding memory broadcast in X86InstrInfo::foldMemoryOperandImpl (PR #79761)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 28 09:15:28 PST 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 6d7c8a6e062a237f1a23e7753c6737f5796e5188 062fa4d3a37fc6c9ad5a5b3408fdb56b7f2caf61 -- llvm/lib/Target/X86/X86FixupVectorConstants.cpp llvm/lib/Target/X86/X86InstrFoldTables.cpp llvm/lib/Target/X86/X86InstrFoldTables.h llvm/lib/Target/X86/X86InstrInfo.cpp llvm/lib/Target/X86/X86InstrInfo.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/X86/X86InstrFoldTables.cpp b/llvm/lib/Target/X86/X86InstrFoldTables.cpp
index b27936d381..42e00e1d1a 100644
--- a/llvm/lib/Target/X86/X86InstrFoldTables.cpp
+++ b/llvm/lib/Target/X86/X86InstrFoldTables.cpp
@@ -145,8 +145,8 @@ llvm::lookupFoldTable(unsigned RegOp, unsigned OpNum) {
return lookupFoldTableImpl(FoldTable, RegOp);
}
-const X86FoldTableEntry *
-llvm::lookupBroadcastFoldTable(unsigned RegOp, unsigned OpNum) {
+const X86FoldTableEntry *llvm::lookupBroadcastFoldTable(unsigned RegOp,
+ unsigned OpNum) {
ArrayRef<X86FoldTableEntry> FoldTable;
if (OpNum == 1)
FoldTable = ArrayRef(BroadcastTable1);
diff --git a/llvm/lib/Target/X86/X86InstrFoldTables.h b/llvm/lib/Target/X86/X86InstrFoldTables.h
index 5fb5b17ef6..9c5dea48d2 100644
--- a/llvm/lib/Target/X86/X86InstrFoldTables.h
+++ b/llvm/lib/Target/X86/X86InstrFoldTables.h
@@ -55,7 +55,7 @@ const X86FoldTableEntry *lookupUnfoldTable(unsigned MemOp);
// Look up the broadcast folding table entry for this instruction from
// the regular memory instruction.
const X86FoldTableEntry *lookupBroadcastFoldTableBySize(unsigned MemOp,
- unsigned BroadcastBits);
+ unsigned BroadcastBits);
bool matchBroadcastSize(const X86FoldTableEntry &Entry, unsigned BroadcastBits);
} // namespace llvm
``````````
</details>
https://github.com/llvm/llvm-project/pull/79761
More information about the llvm-commits
mailing list