summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Value.cpp
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2013-11-15 01:34:59 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2013-11-15 01:34:59 +0000
commitb03bd4d96bfa6fe58afd7e4c238fad354b701ecd (patch)
tree187df4c6d831f6521192e03afdc4a16fc259c50e /llvm/lib/IR/Value.cpp
parent08c0b1a1bd345aadf2755358e4463b2c1047c616 (diff)
downloadbcm5719-llvm-b03bd4d96bfa6fe58afd7e4c238fad354b701ecd.tar.gz
bcm5719-llvm-b03bd4d96bfa6fe58afd7e4c238fad354b701ecd.zip
Add addrspacecast instruction.
Patch by Michele Scandale! llvm-svn: 194760
Diffstat (limited to 'llvm/lib/IR/Value.cpp')
-rw-r--r--llvm/lib/IR/Value.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/IR/Value.cpp b/llvm/lib/IR/Value.cpp
index 6698f832b25..35808a658b4 100644
--- a/llvm/lib/IR/Value.cpp
+++ b/llvm/lib/IR/Value.cpp
@@ -365,7 +365,8 @@ static Value *stripPointerCastsAndOffsets(Value *V) {
break;
}
V = GEP->getPointerOperand();
- } else if (Operator::getOpcode(V) == Instruction::BitCast) {
+ } else if (Operator::getOpcode(V) == Instruction::BitCast ||
+ Operator::getOpcode(V) == Instruction::AddrSpaceCast) {
V = cast<Operator>(V)->getOperand(0);
} else if (GlobalAlias *GA = dyn_cast<GlobalAlias>(V)) {
if (StripKind == PSK_ZeroIndices || GA->mayBeOverridden())
OpenPOWER on IntegriCloud