[llvm] AMDGPU: Legalize atomicrmw fadd for v2f16/v2bf16 for local memory (PR #95393)

Shilei Tian via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 13 09:09:51 PDT 2024


================
@@ -15931,6 +15931,16 @@ static OptimizationRemark emitAtomicRMWLegalRemark(const AtomicRMWInst *RMW) {
          << " operation at memory scope " << MemScope;
 }
 
+static bool isHalf2OrBFloat2(Type *Ty) {
+  if (FixedVectorType *VT = dyn_cast<FixedVectorType>(Ty)) {
----------------
shiltian wrote:

nit. I think LLVM standard suggests to use `auto` where cast is used.

```suggestion
  if (auto *VT = dyn_cast<FixedVectorType>(Ty)) {
```

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


More information about the llvm-commits mailing list