[llvm] [AMDGPU] Support double type in atomic optimizer. (PR #84307)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 17 21:45:15 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 68d07bf34f6b044193c429d9f8cf07500a4775ea 5fd846e6bf908f421917c6b990a7073d14fbe166 -- llvm/lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp b/llvm/lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp
index de68d0193d..dbb3de76b4 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp
@@ -923,7 +923,8 @@ void AMDGPUAtomicOptimizerImpl::optimizeAtomic(Instruction &I,
if (TyBitWidth == 64) {
Value *CastedPhi = B.CreateBitCast(PHI, IntNTy);
Value *const ExtractLo = B.CreateTrunc(CastedPhi, Int32Ty);
- Value *const ExtractHi = B.CreateTrunc(B.CreateLShr(CastedPhi, 32), Int32Ty);
+ Value *const ExtractHi =
+ B.CreateTrunc(B.CreateLShr(CastedPhi, 32), Int32Ty);
CallInst *const ReadFirstLaneLo =
B.CreateIntrinsic(Intrinsic::amdgcn_readfirstlane, {}, ExtractLo);
CallInst *const ReadFirstLaneHi =
``````````
</details>
https://github.com/llvm/llvm-project/pull/84307
More information about the llvm-commits
mailing list