[PATCH] D104264: Fix atomic loads and stores of 64-bit values in non-default address spaces on ARM

Renato Golin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 15 00:44:04 PDT 2021


rengolin added a reviewer: theraven.
rengolin added a comment.

Hi Koutheir,

I'm not an expert on atomics or the various uses of address spaces in the wild, but I'm curious as to what your use case is.

cheers,
--renato



================
Comment at: llvm/lib/Target/ARM/ARMISelLowering.cpp:19640
+      // The pointer does not point to the default address space.
+      // Perform an address space cast to the default address space.
+      //
----------------
This doesn't sound like the right solution. 

Maybe I'm misunderstanding what you're trying to do, but if the address space is different because it's in a different virtual environment (encapsulation, security, hardware purposes), then casting it to the default address space won't point to the "right" element.


================
Comment at: llvm/lib/Target/ARM/ARMISelLowering.cpp:19696
+
+    unsigned AddressSpace =
+        cast<PointerType>(Addr->getType())->getAddressSpace();
----------------
Copy and paste introduce errors. Please, factor this in a new anonymous namespace helper.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104264/new/

https://reviews.llvm.org/D104264



More information about the llvm-commits mailing list