Fix tail call conversion and test cases.

Summary:
A previous diff accidentally disabled tail call conversion.

Additionally some test cases relied on output of "-v=2". Fix those.

(cherry picked from FBD3823760)
This commit is contained in:
Maksim Panchenko 2016-09-06 13:19:26 -07:00
parent c27a6a5c63
commit 1cf200107e
1 changed files with 2 additions and 2 deletions

View File

@ -585,8 +585,8 @@ bool BinaryFunction::disassemble(ArrayRef<uint8_t> FunctionData) {
// Assign proper opcode for tail calls, so that they could be // Assign proper opcode for tail calls, so that they could be
// treated as calls. // treated as calls.
if (!IsCall) { if (!IsCall) {
if (opts::Verbosity >= 2 && if (!MIA->convertJmpToTailCall(Instruction) &&
!MIA->convertJmpToTailCall(Instruction)) { opts::Verbosity >= 2) {
assert(IsCondBranch && "unknown tail call instruction"); assert(IsCondBranch && "unknown tail call instruction");
errs() << "BOLT-WARNING: conditional tail call detected in " errs() << "BOLT-WARNING: conditional tail call detected in "
<< "function " << *this << " at 0x" << "function " << *this << " at 0x"