forked from OSchip/llvm-project
[BOLT] Fix SCTC bug
Summary: If conditional branch has been converted to conditional tail call, it may be considered for SCTC optimization later since it will appear as a tail call. We have to make sure that the tail call we are considering is not a conditional branch. (cherry picked from FBD5884777)
This commit is contained in:
parent
b006d2a860
commit
156fc73157
|
@ -585,7 +585,7 @@ uint64_t SimplifyConditionalTailCalls::fixTailCalls(BinaryContext &BC,
|
|||
continue;
|
||||
|
||||
auto *Instr = BB->getFirstNonPseudoInstr();
|
||||
if (!MIA->isTailCall(*Instr))
|
||||
if (!MIA->isTailCall(*Instr) || BC.MIA->isConditionalBranch(*Instr))
|
||||
continue;
|
||||
|
||||
auto *CalleeSymbol = MIA->getTargetSymbol(*Instr);
|
||||
|
|
Loading…
Reference in New Issue