[llvm-bugs] [Bug 27273] New: Missing Verifier check for debug info intrinsics that precede their SSA operands

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Apr 7 17:31:18 PDT 2016


            Bug ID: 27273
           Summary: Missing Verifier check for debug info intrinsics that
                    precede their SSA operands
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Core LLVM classes
          Assignee: unassignedbugs at nondot.org
          Reporter: dexonsmith at apple.com
                CC: aprantl at apple.com, llvm-bugs at lists.llvm.org
    Classification: Unclassified

r265631, reverted in r265637, uncovered a bug in -reassociate that breaks the
order of @llvm.dbg.value instructions compared to the SSA values they

The current Verifier check doesn't look through the
MetadataAsValue/LocalAsMetadata operands that debug info intrinsics use, such
as `metadata i32 %x` in:
call void @llvm.dbg.value(metadata i32 %x, ...)
%x = add i32 0, %arg

As a result, we need a hack in llvm::MapMetadata to return `!{}` instead of
`null` when RF_IgnoreMissingLocals is turned off to prevent a crash in

We should add a verifier check; fix the bugs; write an upgrade to drop invalid
instructions and commit the verifier check; and then fix llvm::MapMetadata to
ignore RF_IgnoreMissingLocals (as r265631 tried to do).

There's a more complete write-up of the issue on llvm-commits (in the reply to


For now I'm going to push forward with a modified version of r265631 that
documents what's going on.  I'll add a comment with the revision.

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/20160408/d2a73c12/attachment.html>

More information about the llvm-bugs mailing list