mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-05 14:34:55 +00:00
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
This commit is contained in:
parent
5f33cbc414
commit
e16fa983bf
@ -1797,11 +1797,6 @@ Instruction *InstCombiner::visitBitCast(BitCastInst &CI) {
|
|||||||
Type *DstElTy = DstPTy->getElementType();
|
Type *DstElTy = DstPTy->getElementType();
|
||||||
Type *SrcElTy = SrcPTy->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
|
// 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.
|
// size, rewrite the allocation instruction to allocate the "right" type.
|
||||||
// There is no need to modify malloc calls because it is their bitcast that
|
// There is no need to modify malloc calls because it is their bitcast that
|
||||||
|
Loading…
x
Reference in New Issue
Block a user