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/Analysis | |
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/Analysis')
-rw-r--r-- | llvm/lib/Analysis/ConstantFolding.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/llvm/lib/Analysis/ConstantFolding.cpp b/llvm/lib/Analysis/ConstantFolding.cpp index 613804d6d2d..df79849c3cf 100644 --- a/llvm/lib/Analysis/ConstantFolding.cpp +++ b/llvm/lib/Analysis/ConstantFolding.cpp @@ -51,12 +51,6 @@ static Constant *FoldBitCast(Constant *C, Type *DestTy, if (C->isAllOnesValue() && !DestTy->isX86_MMXTy()) return Constant::getAllOnesValue(DestTy); - // Bitcast of Bitcast can be done using a single cast. - ConstantExpr *CE = dyn_cast<ConstantExpr>(C); - if (CE && CE->getOpcode() == Instruction::BitCast) { - return ConstantExpr::getBitCast(CE->getOperand(0), DestTy); - } - // The code below only handles casts to vectors currently. VectorType *DestVTy = dyn_cast<VectorType>(DestTy); if (DestVTy == 0) |