[PATCH] D36862: AMDGPU: Handle non-temporal loads and stores

Brian Sumner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 28 10:59:01 PDT 2017


b-sumner added inline comments.


================
Comment at: lib/Target/AMDGPU/SIMemoryLegalizer.cpp:336-337
+  if (MOI.IsNonTemporal) {
+    // FIXME: handle non-temporal atomic loads?
+    assert(!MOI.IsAtomic);
+
----------------
t-tye wrote:
> According to http://llvm.org/docs/LangRef.html#load-instruction :
> ```
> !nontemporal does not have any defined semantics for atomic loads.
> ```
> 
> My reading of this is that it is allowed to have nontemporal on atomic loads, but the meaning of it is not defined by LLVM. If so an assert is not correct here.
> 
> My suggestion is that AMDGPU target treats it the same as non-atomic.
I'd prefer ignoring the non-temporal in the case of atomics.  Note that one would have to resort to coding in IR to even get it applied; no languages have a means to request non-temporal atomic operations.


https://reviews.llvm.org/D36862





More information about the llvm-commits mailing list