summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2015-06-07 20:17:42 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2015-06-07 20:17:42 +0000
commitfb88aca3487d736ed9607f705c89e57ce35f899d (patch)
treeeb38de4602b51c1669142edf0a748ea7708785c4 /llvm/lib/Transforms
parente83379e8e4bd462a2fcd44a48accab9270338d0b (diff)
downloadbcm5719-llvm-fb88aca3487d736ed9607f705c89e57ce35f899d.tar.gz
bcm5719-llvm-fb88aca3487d736ed9607f705c89e57ce35f899d.zip
Make NaryReassociate pass the address space to isLegalAddressingMode
No test since the kinds of transforms this prevents seem to not really be relevant for SI's different addressing modes. llvm-svn: 239261
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/NaryReassociate.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/NaryReassociate.cpp b/llvm/lib/Transforms/Scalar/NaryReassociate.cpp
index 6ac5ff85e32..4cf68b00da0 100644
--- a/llvm/lib/Transforms/Scalar/NaryReassociate.cpp
+++ b/llvm/lib/Transforms/Scalar/NaryReassociate.cpp
@@ -317,8 +317,10 @@ static bool isGEPFoldable(GetElementPtrInst *GEP,
BaseOffset += DL->getStructLayout(STy)->getElementOffset(Field);
}
}
+
+ unsigned AddrSpace = GEP->getPointerAddressSpace();
return TTI->isLegalAddressingMode(GEP->getType()->getElementType(), BaseGV,
- BaseOffset, HasBaseReg, Scale);
+ BaseOffset, HasBaseReg, Scale, AddrSpace);
}
Instruction *NaryReassociate::tryReassociateGEP(GetElementPtrInst *GEP) {
OpenPOWER on IntegriCloud