[llvm] [GISel] Enforce G_PTR_ADD RHS type matching index size for addr space (PR #84352)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 7 10:10:33 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 8f79cdd8da97c131ae7d8a3210bb69cb6654903d 4c7b4b6f1ac4a59b874c9bfde9ad501df6de0ffb -- llvm/lib/CodeGen/MachineVerifier.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/CodeGen/MachineVerifier.cpp b/llvm/lib/CodeGen/MachineVerifier.cpp
index c29daf7e68..cdb6cc63fe 100644
--- a/llvm/lib/CodeGen/MachineVerifier.cpp
+++ b/llvm/lib/CodeGen/MachineVerifier.cpp
@@ -1306,7 +1306,8 @@ void MachineVerifier::verifyPreISelGenericInstruction(const MachineInstr *MI) {
unsigned AS = PtrTy.getAddressSpace();
unsigned IndexSizeInBits = DL.getIndexSize(AS) * 8;
if (OffsetTy.getScalarSizeInBits() != IndexSizeInBits)
- report("gep offset operand must match index size for address space", MI);
+ report("gep offset operand must match index size for address space",
+ MI);
}
// TODO: Is the offset allowed to be a scalar with a vector?
``````````
</details>
https://github.com/llvm/llvm-project/pull/84352
More information about the llvm-commits
mailing list