git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305637
91177308-0d34-0410-b5e6-
96231b3b80d8
const TargetTransformInfo *TTI) {
bool Change = false;
+ // Make sure this block is a trivial return block.
+ assert(BB->getFirstNonPHIOrDbg() == Ret &&
+ "Trying to fold non-trivial return block");
+
// If the return block contains nothing but the return and PHI's,
// there might be an opportunity to duplicate the return in its
// predecessors and perform TRE there. Look for predecessors that end