[llvm] [DirectX] Fix crash in passes when building with LLVM_ENABLE_EXPENSIVE_CHECKS (PR #150483)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 24 12:24:06 PDT 2025
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 HEAD~1 HEAD --extensions cpp -- llvm/lib/Target/DirectX/DXILLegalizePass.cpp llvm/lib/Target/DirectX/DXILResourceAccess.cpp llvm/lib/Transforms/Scalar/Scalarizer.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/DirectX/DXILLegalizePass.cpp b/llvm/lib/Target/DirectX/DXILLegalizePass.cpp
index f4b9d047e..3427968d1 100644
--- a/llvm/lib/Target/DirectX/DXILLegalizePass.cpp
+++ b/llvm/lib/Target/DirectX/DXILLegalizePass.cpp
@@ -574,9 +574,10 @@ legalizeGetHighLowi64Bytes(Instruction &I,
return false;
}
-static bool legalizeScalarLoadStoreOnArrays(
- Instruction &I, SmallVectorImpl<Instruction *> &ToRemove,
- DenseMap<Value *, Value *> &) {
+static bool
+legalizeScalarLoadStoreOnArrays(Instruction &I,
+ SmallVectorImpl<Instruction *> &ToRemove,
+ DenseMap<Value *, Value *> &) {
Value *PtrOp;
unsigned PtrOpIndex;
@@ -636,7 +637,7 @@ public:
ReplacedValues.clear();
for (auto &I : instructions(F)) {
for (auto &LegalizationFn : LegalizationPipeline[Stage])
- MadeChange |= LegalizationFn(I, ToRemove, ReplacedValues);
+ MadeChange |= LegalizationFn(I, ToRemove, ReplacedValues);
}
for (auto *Inst : reverse(ToRemove))
``````````
</details>
https://github.com/llvm/llvm-project/pull/150483
More information about the llvm-commits
mailing list