summaryrefslogtreecommitdiff
path: root/lib/Transforms
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2013-11-15 05:45:08 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2013-11-15 05:45:08 +0000
commit6dd44d3b7f33c9984dfb40461630d50c4fed1234 (patch)
tree377a4c3e7bbe4284ee88a19a035313cfc7ba3b5b /lib/Transforms
parent01ad8c308fe549afadb9da18ac0dd30c848c4e1e (diff)
downloadllvm-6dd44d3b7f33c9984dfb40461630d50c4fed1234.tar.gz
llvm-6dd44d3b7f33c9984dfb40461630d50c4fed1234.tar.bz2
llvm-6dd44d3b7f33c9984dfb40461630d50c4fed1234.tar.xz
Add instcombine visitor for addrspacecast
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194786 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/InstCombine/InstCombine.h1
-rw-r--r--lib/Transforms/InstCombine/InstCombineCasts.cpp4
2 files changed, 5 insertions, 0 deletions
diff --git a/lib/Transforms/InstCombine/InstCombine.h b/lib/Transforms/InstCombine/InstCombine.h
index ee9510609e..a5eddc2061 100644
--- a/lib/Transforms/InstCombine/InstCombine.h
+++ b/lib/Transforms/InstCombine/InstCombine.h
@@ -178,6 +178,7 @@ public:
Instruction *visitPtrToInt(PtrToIntInst &CI);
Instruction *visitIntToPtr(IntToPtrInst &CI);
Instruction *visitBitCast(BitCastInst &CI);
+ Instruction *visitAddrSpaceCast(AddrSpaceCastInst &CI);
Instruction *FoldSelectOpOp(SelectInst &SI, Instruction *TI,
Instruction *FI);
Instruction *FoldSelectIntoOp(SelectInst &SI, Value*, Value*);
diff --git a/lib/Transforms/InstCombine/InstCombineCasts.cpp b/lib/Transforms/InstCombine/InstCombineCasts.cpp
index 01894cbfdc..a1aedd4e8f 100644
--- a/lib/Transforms/InstCombine/InstCombineCasts.cpp
+++ b/lib/Transforms/InstCombine/InstCombineCasts.cpp
@@ -1851,3 +1851,7 @@ Instruction *InstCombiner::visitBitCast(BitCastInst &CI) {
return commonPointerCastTransforms(CI);
return commonCastTransforms(CI);
}
+
+Instruction *InstCombiner::visitAddrSpaceCast(AddrSpaceCastInst &CI) {
+ return commonCastTransforms(CI);
+}