[llvm] [SelectionDAG] Update for scalable MemoryType in MMO (PR #70452)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 27 06:18:08 PDT 2023
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 4fc1e7db273d2c1d0140ab7234b2f7b05d58a397 d3fb8a001b8db73d90be9f2ffd732bc4b6c55815 -- llvm/include/llvm/Analysis/MemoryLocation.h llvm/include/llvm/CodeGen/MachineFunction.h llvm/include/llvm/CodeGen/MachineMemOperand.h llvm/lib/Analysis/BasicAliasAnalysis.cpp llvm/lib/CodeGen/GlobalISel/LoadStoreOpt.cpp llvm/lib/CodeGen/MachineFunction.cpp llvm/lib/CodeGen/MachineInstr.cpp llvm/lib/CodeGen/MachineOperand.cpp llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/include/llvm/CodeGen/MachineFunction.h b/llvm/include/llvm/CodeGen/MachineFunction.h
index 53c066bccffa..f1ea0be519ed 100644
--- a/llvm/include/llvm/CodeGen/MachineFunction.h
+++ b/llvm/include/llvm/CodeGen/MachineFunction.h
@@ -1051,11 +1051,9 @@ public:
int64_t Offset, TypeSize ts) {
return getMachineMemOperand(
MMO, Offset,
- ts.getKnownMinValue() == ~UINT64_C(0)
- ? LLT()
- : ts.isScalable()
- ? LLT::scalable_vector(1, 8 * ts.getKnownMinValue())
- : LLT::scalar(8 * ts.getKnownMinValue()));
+ ts.getKnownMinValue() == ~UINT64_C(0) ? LLT()
+ : ts.isScalable() ? LLT::scalable_vector(1, 8 * ts.getKnownMinValue())
+ : LLT::scalar(8 * ts.getKnownMinValue()));
}
/// getMachineMemOperand - Allocate a new MachineMemOperand by copying
diff --git a/llvm/lib/CodeGen/MachineOperand.cpp b/llvm/lib/CodeGen/MachineOperand.cpp
index 02a58263ff27..ea624ec8a128 100644
--- a/llvm/lib/CodeGen/MachineOperand.cpp
+++ b/llvm/lib/CodeGen/MachineOperand.cpp
@@ -1103,14 +1103,12 @@ MachineMemOperand::MachineMemOperand(MachinePointerInfo ptrinfo, Flags f,
const MDNode *Ranges, SyncScope::ID SSID,
AtomicOrdering Ordering,
AtomicOrdering FailureOrdering)
- : MachineMemOperand(
- ptrinfo, f,
- ts.getKnownMinValue() == ~UINT64_C(0)
- ? LLT()
- : ts.isScalable()
- ? LLT::scalable_vector(1, 8 * ts.getKnownMinValue())
- : LLT::scalar(8 * ts.getKnownMinValue()),
- a, AAInfo, Ranges, SSID, Ordering, FailureOrdering) {}
+ : MachineMemOperand(ptrinfo, f,
+ ts.getKnownMinValue() == ~UINT64_C(0) ? LLT()
+ : ts.isScalable()
+ ? LLT::scalable_vector(1, 8 * ts.getKnownMinValue())
+ : LLT::scalar(8 * ts.getKnownMinValue()),
+ a, AAInfo, Ranges, SSID, Ordering, FailureOrdering) {}
void MachineMemOperand::refineAlignment(const MachineMemOperand *MMO) {
// The Value and Offset may differ due to CSE. But the flags and size
``````````
</details>
https://github.com/llvm/llvm-project/pull/70452
More information about the llvm-commits
mailing list