[PATCH] D92951: AMDGPU: If a store defines (alias) a load, it clobbers the load.
    Matt Arsenault via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Sat Dec 12 06:45:19 PST 2020
    
    
  
arsenm added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUAnnotateUniformValues.cpp:115
+        // Store defines the load and thus clobbers it.
+        (Q.isDef() && isa<StoreInst>(Q.getInst())))
       return true;
----------------
cfang wrote:
> arsenm wrote:
> > Specifically checking for store instructions is going to be wrong since many other instruction types can also write to memory
> Changed to mayWriteToMemory.
Why does it need to check the instruction at all? Why isn't Q.isDef() sufficient?
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92951/new/
https://reviews.llvm.org/D92951
    
    
More information about the llvm-commits
mailing list