[llvm] [GlobalISel] Use replaceRegOrBuildCopy when legalizer-combining anyext(undef). (PR #119721)

via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 12 08:54:49 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 e84566ff2b8e9bb67ccc6764d7003871535e550e 566f4a56c358da0dbc01027afa0cdca79db7a45b --extensions h -- llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h b/llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h
index 3580ec0f0f..48081502ef 100644
--- a/llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h
+++ b/llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h
@@ -393,7 +393,8 @@ public:
         if (!isInstLegal({TargetOpcode::G_IMPLICIT_DEF, {DstTy}}))
           return false;
         LLVM_DEBUG(dbgs() << ".. Combine G_ANYEXT(G_IMPLICIT_DEF): " << MI;);
-        auto Impl = Builder.buildInstr(TargetOpcode::G_IMPLICIT_DEF, {DstTy}, {});
+        auto Impl =
+            Builder.buildInstr(TargetOpcode::G_IMPLICIT_DEF, {DstTy}, {});
         replaceRegOrBuildCopy(DstReg, Impl.getReg(0), MRI, Builder, UpdatedDefs,
                               Observer);
         UpdatedDefs.push_back(DstReg);

``````````

</details>


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


More information about the llvm-commits mailing list