[llvm] [msan] Use horizontal sub to compute shadow for horizontal add (PR #124835)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 28 13:03:20 PST 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 7bd9c780e36399394fe8eae9678eb448d53e33f0 5dcb768e9b983db2384592cfb4f8b74361cae7d8 --extensions cpp -- llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp b/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
index 8f014ce195..da16028f6c 100644
--- a/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
@@ -4055,7 +4055,7 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
 
     Intrinsic::ID shadowIntrinsicID = I.getIntrinsicID();
 
-    switch(I.getIntrinsicID()) {
+    switch (I.getIntrinsicID()) {
     case Intrinsic::x86_sse3_hsub_ps:
       shadowIntrinsicID = Intrinsic::x86_sse3_hadd_ps;
       break;
@@ -4110,11 +4110,10 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
 
     default:
       break;
-   }
+    }
 
-    return handleIntrinsicByApplyingToShadow(
-        I, shadowIntrinsicID,
-        /*trailingVerbatimArgs*/ 0);
+    return handleIntrinsicByApplyingToShadow(I, shadowIntrinsicID,
+                                             /*trailingVerbatimArgs*/ 0);
   }
 
   /// Handle Arm NEON vector store intrinsics (vst{2,3,4}, vst1x_{2,3,4},

``````````

</details>


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


More information about the llvm-commits mailing list