summaryrefslogtreecommitdiff
path: root/lib/Transforms/InstCombine
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2014-01-14 19:56:57 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2014-01-14 19:56:57 +0000
commite16fa983bf1b379558dab97b4bbc1494c35a2fa3 (patch)
treecef26315d38cd8d61b3c85d2b7d1f73ca7c6965e /lib/Transforms/InstCombine
parent5f33cbc414937eb39cefb031c2e5b11be8dc9237 (diff)
downloadllvm-e16fa983bf1b379558dab97b4bbc1494c35a2fa3.tar.gz
llvm-e16fa983bf1b379558dab97b4bbc1494c35a2fa3.tar.bz2
llvm-e16fa983bf1b379558dab97b4bbc1494c35a2fa3.tar.xz
Remove a check for an illegal condition.
Bitcasts can't be between address spaces anymore. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199253 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/InstCombine')
-rw-r--r--lib/Transforms/InstCombine/InstCombineCasts.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineCasts.cpp b/lib/Transforms/InstCombine/InstCombineCasts.cpp
index 44e60b775c..2e7ec11391 100644
--- a/lib/Transforms/InstCombine/InstCombineCasts.cpp
+++ b/lib/Transforms/InstCombine/InstCombineCasts.cpp
@@ -1797,11 +1797,6 @@ Instruction *InstCombiner::visitBitCast(BitCastInst &CI) {
Type *DstElTy = DstPTy->getElementType();
Type *SrcElTy = SrcPTy->getElementType();
- // If the address spaces don't match, don't eliminate the bitcast, which is
- // required for changing types.
- if (SrcPTy->getAddressSpace() != DstPTy->getAddressSpace())
- return 0;
-
// If we are casting a alloca to a pointer to a type of the same
// size, rewrite the allocation instruction to allocate the "right" type.
// There is no need to modify malloc calls because it is their bitcast that