[PATCH] D92056: [LoopVec] Support global addresses as argument to uniform mem ops
    Florian Hahn via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Dec  3 13:52:54 PST 2020
    
    
  
fhahn accepted this revision.
fhahn added a comment.
This revision is now accepted and ready to land.
LGTM, thanks! It looks like the patch needs re-formatting before submitting.
================
Comment at: llvm/test/Transforms/LoopVectorize/X86/cost-model-assert.ll:52
+; CHECK-NEXT:    [[TMP17:%.*]] = load i8, i8* undef, align 1, [[TBAA1]]
+; CHECK-NEXT:    [[TMP18:%.*]] = or <4 x i32> [[TMP14]], zeroinitializer
+; CHECK-NEXT:    [[TMP19:%.*]] = or <4 x i32> [[TMP15]], zeroinitializer
----------------
anna wrote:
> Any idea why these extra no-ops get added? That seems like an unfortunate side effect (especially given the algorithm works to reduce compile time). 
IIUC this is related to the fact that we are now considering `%1 = load i8, i8* undef, align 1,` as uniform and probably chose a higher interleave count because of that?
If the pointer argument would be an instruction or argument, we should get the same result even without the patch. It might be worth changing the load to use a 'real' pointer.
================
Comment at: llvm/test/Transforms/LoopVectorize/X86/uniform_mem_op.ll:600
+ at GAddr = external global i32 align 4
+define i32 @uniform_load_global() {
+; CHECK-LABEL: @uniform_load_global(
----------------
With the patch, constant expressions should also be supported, right? Could you add a test case for that  as well?
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92056/new/
https://reviews.llvm.org/D92056
    
    
More information about the llvm-commits
mailing list