[llvm] [HLSL] Move FNeg legalization to the DXILLegalization pass (PR #140942)

via llvm-commits llvm-commits at lists.llvm.org
Wed May 21 10:58:48 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/DXILPrepare.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 511e9835f..086de5986 100644
--- a/llvm/lib/Target/DirectX/DXILLegalizePass.cpp
+++ b/llvm/lib/Target/DirectX/DXILLegalizePass.cpp
@@ -409,7 +409,7 @@ static void updateFnegToFsub(Instruction &I,
                              SmallVectorImpl<Instruction *> &ToRemove,
                              DenseMap<Value *, Value *> &ReplacedValues) {
   const Intrinsic::ID ID = I.getOpcode();
-  if(ID != Instruction::FNeg)
+  if (ID != Instruction::FNeg)
     return;
 
   IRBuilder<> Builder(&I);

``````````

</details>


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


More information about the llvm-commits mailing list