OSDN Git Service

[AMDGPU] Remove assumption that vector and scalar types do not alias
authorStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
Fri, 31 Mar 2017 20:16:54 +0000 (20:16 +0000)
committerStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
Fri, 31 Mar 2017 20:16:54 +0000 (20:16 +0000)
Differential Revision: https://reviews.llvm.org/D31547

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299250 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp

index 1a0f37e..808af1f 100644 (file)
@@ -98,14 +98,6 @@ AliasResult AMDGPUAAResult::alias(const MemoryLocation &LocA,
   AliasResult Result = ASAliasRules.getAliasResult(asA, asB);
   if (Result == NoAlias) return Result;
 
-  if (isa<Argument>(LocA.Ptr) && isa<Argument>(LocB.Ptr)) {
-    Type *T1 = cast<PointerType>(LocA.Ptr->getType())->getElementType();
-    Type *T2 = cast<PointerType>(LocB.Ptr->getType())->getElementType();
-
-    if ((T1->isVectorTy() && !T2->isVectorTy()) ||
-        (T2->isVectorTy() && !T1->isVectorTy()))
-      return NoAlias;
-  }
   // Forward the query to the next alias analysis.
   return AAResultBase::alias(LocA, LocB);
 }