[libcxx-commits] [libcxx] [libcxx] Adjust inline assembly constraints for the AMDGPU target (PR #101747)

via libcxx-commits libcxx-commits at lists.llvm.org
Mon Aug 5 09:42:25 PDT 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 9fea73110ecc0a13d18e5c52f8e7fa62a9de9ee9 be681d36302900b67e02b4b87507e9b6aec2a8e2 --extensions h -- libcxx/test/support/test_macros.h
``````````

</details>

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

``````````diff
diff --git a/libcxx/test/support/test_macros.h b/libcxx/test/support/test_macros.h
index d05d580826..e96208c85d 100644
--- a/libcxx/test/support/test_macros.h
+++ b/libcxx/test/support/test_macros.h
@@ -305,7 +305,7 @@ inline Tp& DoNotOptimize(Tp& value) {
   // The `m` and `r` output constraint is invalid in the AMDGPU backend as well
   // as i8 / i1 arguments, so we just capture the pointer instead.
 #  if defined(__AMDGPU__)
-  Tp *tmp = &value;
+  Tp* tmp = &value;
   asm volatile("" : "+v"(tmp) : : "memory");
 #  elif defined(__clang__)
   asm volatile("" : "+r,m"(value) : : "memory");

``````````

</details>


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


More information about the libcxx-commits mailing list