[PATCH] D46085: AMDGPU/SI: Don't promote alloca to vector for atomic load/store

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 25 14:38:41 PDT 2018


arsenm added inline comments.


================
Comment at: lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp:327-328
     LoadInst *LI = cast<LoadInst>(Inst);
+    if (LI->getOrdering() != AtomicOrdering::NotAtomic)
+      return false;
     // Currently only handle the case where the Pointer Operand is a GEP so check for that case.
----------------
You can use isSimple which checks volatile and atomic


================
Comment at: test/CodeGen/AMDGPU/vector-alloca-atomic.ll:2
+; RUN: opt -S -mtriple=amdgcn---amdgiz -amdgpu-promote-alloca -sroa -instcombine < %s | FileCheck -check-prefix=OPT %s
+target datalayout = "A5"
+
----------------
You shouldn't need this


https://reviews.llvm.org/D46085





More information about the llvm-commits mailing list