[llvm-branch-commits] [llvm-branch] r341040 - Merging r340416:

Hans Wennborg via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Aug 30 01:46:10 PDT 2018


Author: hans
Date: Thu Aug 30 01:46:10 2018
New Revision: 341040

URL: http://llvm.org/viewvc/llvm-project?rev=341040&view=rev
Log:
Merging r340416:
------------------------------------------------------------------------
r340416 | hakzsam | 2018-08-22 18:08:43 +0200 (Wed, 22 Aug 2018) | 8 lines

AMDGPU: fix existing alias rules for constant and global

Constant and global may alias, also one rules table wasn't
ordered correctly.

Pinpointed by Matt.

v2: add a test with swapped parameters
------------------------------------------------------------------------

Modified:
    llvm/branches/release_70/   (props changed)
    llvm/branches/release_70/lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp
    llvm/branches/release_70/test/CodeGen/AMDGPU/amdgpu-alias-analysis.ll

Propchange: llvm/branches/release_70/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Aug 30 01:46:10 2018
@@ -1,3 +1,3 @@
 /llvm/branches/Apple/Pertwee:110850,110961
 /llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,338552,338554,338569,338599,338610,338658,338665,338682,338703,338709,338716,338751,338762,338817,338841,338902,338915,338968,339073,339091,339166,339179,339184,339190,339225,339316,339319,339411,339492,339515,339533,339535-339536,339600,339636,339674,339769,339822,339883,339895-339896,339945,340158,340303,340455,340641,340691,340820,340839
+/llvm/trunk:155241,338552,338554,338569,338599,338610,338658,338665,338682,338703,338709,338716,338751,338762,338817,338841,338902,338915,338968,339073,339091,339166,339179,339184,339190,339225,339316,339319,339411,339492,339515,339533,339535-339536,339600,339636,339674,339769,339822,339883,339895-339896,339945,340158,340303,340416,340455,340641,340691,340820,340839

Modified: llvm/branches/release_70/lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_70/lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp?rev=341040&r1=341039&r2=341040&view=diff
==============================================================================
--- llvm/branches/release_70/lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp (original)
+++ llvm/branches/release_70/lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp Thu Aug 30 01:46:10 2018
@@ -54,8 +54,8 @@ AMDGPUAAResult::ASAliasRulesTy::ASAliasR
   static const AliasResult ASAliasRulesPrivIsZero[6][6] = {
   /*             Private    Global    Constant  Group     Flat      Region*/
   /* Private  */ {MayAlias, NoAlias , NoAlias , NoAlias , MayAlias, NoAlias},
-  /* Global   */ {NoAlias , MayAlias, NoAlias , NoAlias , MayAlias, NoAlias},
-  /* Constant */ {NoAlias , NoAlias , MayAlias, NoAlias , MayAlias, NoAlias},
+  /* Global   */ {NoAlias , MayAlias, MayAlias, NoAlias , MayAlias, NoAlias},
+  /* Constant */ {NoAlias , MayAlias, MayAlias, NoAlias , MayAlias, NoAlias},
   /* Group    */ {NoAlias , NoAlias , NoAlias , MayAlias, MayAlias, NoAlias},
   /* Flat     */ {MayAlias, MayAlias, MayAlias, MayAlias, MayAlias, MayAlias},
   /* Region   */ {NoAlias , NoAlias , NoAlias , NoAlias , MayAlias, MayAlias}
@@ -63,10 +63,10 @@ AMDGPUAAResult::ASAliasRulesTy::ASAliasR
   static const AliasResult ASAliasRulesGenIsZero[6][6] = {
   /*             Flat       Global    Region    Group     Constant  Private */
   /* Flat     */ {MayAlias, MayAlias, MayAlias, MayAlias, MayAlias, MayAlias},
-  /* Global   */ {MayAlias, MayAlias, NoAlias , NoAlias , NoAlias , NoAlias},
-  /* Constant */ {MayAlias, NoAlias , MayAlias, NoAlias , NoAlias,  NoAlias},
-  /* Group    */ {MayAlias, NoAlias , NoAlias , MayAlias, NoAlias , NoAlias},
+  /* Global   */ {MayAlias, MayAlias, NoAlias , NoAlias , MayAlias, NoAlias},
   /* Region   */ {MayAlias, NoAlias , NoAlias , NoAlias,  MayAlias, NoAlias},
+  /* Group    */ {MayAlias, NoAlias , NoAlias , MayAlias, NoAlias , NoAlias},
+  /* Constant */ {MayAlias, MayAlias, MayAlias, NoAlias , NoAlias,  NoAlias},
   /* Private  */ {MayAlias, NoAlias , NoAlias , NoAlias , NoAlias , MayAlias}
   };
   assert(AS.MAX_COMMON_ADDRESS <= 5);

Modified: llvm/branches/release_70/test/CodeGen/AMDGPU/amdgpu-alias-analysis.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_70/test/CodeGen/AMDGPU/amdgpu-alias-analysis.ll?rev=341040&r1=341039&r2=341040&view=diff
==============================================================================
--- llvm/branches/release_70/test/CodeGen/AMDGPU/amdgpu-alias-analysis.ll (original)
+++ llvm/branches/release_70/test/CodeGen/AMDGPU/amdgpu-alias-analysis.ll Thu Aug 30 01:46:10 2018
@@ -7,3 +7,15 @@ define void @test(i8 addrspace(5)* %p, i
   ret void
 }
 
+; CHECK: MayAlias:      i8 addrspace(1)* %p1, i8 addrspace(4)* %p
+
+define void @test_constant_vs_global(i8 addrspace(4)* %p, i8 addrspace(1)* %p1) {
+  ret void
+}
+
+; CHECK: MayAlias:      i8 addrspace(1)* %p, i8 addrspace(4)* %p1
+
+define void @test_global_vs_constant(i8 addrspace(1)* %p, i8 addrspace(4)* %p1) {
+  ret void
+}
+




More information about the llvm-branch-commits mailing list