[llvm] r199253 - Remove a check for an illegal condition.

Matt Arsenault Matthew.Arsenault at amd.com
Tue Jan 14 11:56:57 PST 2014


Author: arsenm
Date: Tue Jan 14 13:56:57 2014
New Revision: 199253

URL: http://llvm.org/viewvc/llvm-project?rev=199253&view=rev
Log:
Remove a check for an illegal condition.

Bitcasts can't be between address spaces anymore.

Modified:
    llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp

Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp?rev=199253&r1=199252&r2=199253&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp Tue Jan 14 13:56:57 2014
@@ -1797,11 +1797,6 @@ Instruction *InstCombiner::visitBitCast(
     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





More information about the llvm-commits mailing list