diff --git a/lib/Transforms/Scalar/FastDSE.cpp b/lib/Transforms/Scalar/FastDSE.cpp index 45985ba7175..72857b9c47a 100644 --- a/lib/Transforms/Scalar/FastDSE.cpp +++ b/lib/Transforms/Scalar/FastDSE.cpp @@ -61,17 +61,10 @@ namespace { // See through pointer-to-pointer bitcasts while (isa(v) || isa(v)) - if (BitCastInst* C = dyn_cast(v)) { - if (isa(C->getSrcTy())) - v = C->getOperand(0); - else - break; - } else if (GetElementPtrInst* G = dyn_cast(v)) { - if (G->hasAllZeroIndices()) - v = G->getOperand(0); - else - break; - } + if (BitCastInst* C = dyn_cast(v)) + v = C->getOperand(0); + else if (GetElementPtrInst* G = dyn_cast(v)) + v = G->getOperand(0); } // getAnalysisUsage - We require post dominance frontiers (aka Control