[llvm-bugs] [Bug 28774] New: MIR parsing of BranchProbability is broken

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Jul 29 16:21:49 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=28774

            Bug ID: 28774
           Summary: MIR parsing of BranchProbability is broken
           Product: tools
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: llc
          Assignee: unassignedbugs at nondot.org
          Reporter: d.c.ddcc at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

The branch probability is printed as e.g. "successors:
%bb.2.for.body(0x7c000000 / 0x80000000 = 96.88%)" by BranchProbability.cpp:31:

OS << format("0x%08" PRIx32 " / 0x%08" PRIx32 " = %.2f%%", N, D, Percent);

But this is parsed by MIParser.cpp:463 as:

if (consumeIfPresent(MIToken::lparen)) {
  if (Token.isNot(MIToken::IntegerLiteral))
    return error("expected an integer literal after '('");
  if (getUnsigned(Weight))
    return true;
  lex();
  if (expectAndConsume(MIToken::rparen))
    return true;
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160729/022ebc03/attachment-0001.html>


More information about the llvm-bugs mailing list