Index: lib/CodeGen/IfConversion.cpp =================================================================== --- lib/CodeGen/IfConversion.cpp +++ lib/CodeGen/IfConversion.cpp @@ -671,7 +671,9 @@ std::vector PredDefs; if (TII->DefinesPredicate(*TIB, PredDefs)) return false; - ++Dups1; + // If we get all the way to the branch instructions, don't count them. + if (!TIE->isBranch()) + ++Dups1; ++TIB; ++FIB; }