diff options
| author | Nadav Rotem <nadav.rotem@intel.com> | 2011-08-29 19:58:36 +0000 |
|---|---|---|
| committer | Nadav Rotem <nadav.rotem@intel.com> | 2011-08-29 19:58:36 +0000 |
| commit | 5fc81ffbace7a1b1e671f36923e641f12be98a08 (patch) | |
| tree | e0466bde42bf94cc7ab098f115b6901171455c97 /llvm/lib/Transforms | |
| parent | 967674d26ceb2604ef829eba848e0b4097091cc3 (diff) | |
| download | bcm5719-llvm-5fc81ffbace7a1b1e671f36923e641f12be98a08.tar.gz bcm5719-llvm-5fc81ffbace7a1b1e671f36923e641f12be98a08.zip | |
Fixes following the CR by Chris and Duncan:
Optimize chained bitcasts of the form A->B->A.
Undo r138722 and change isEliminableCastPair to allow this case.
llvm-svn: 138756
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp index 6c42c0c6600..ba90bf6b5c5 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp @@ -1659,11 +1659,6 @@ Instruction *InstCombiner::visitBitCast(BitCastInst &CI) { if (DestTy == Src->getType()) return ReplaceInstUsesWith(CI, Src); - // Bitcasts are transitive. - if (BitCastInst* BSrc = dyn_cast<BitCastInst>(Src)) { - return CastInst::Create(Instruction::BitCast, BSrc->getOperand(0), DestTy); - } - if (PointerType *DstPTy = dyn_cast<PointerType>(DestTy)) { PointerType *SrcPTy = cast<PointerType>(SrcTy); Type *DstElTy = DstPTy->getElementType(); |

