https://llvm.org/bugs/show_bug.cgi?id=27273
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: unassignedb...@nondot.org Reporter: dexonsm...@apple.com CC: apra...@apple.com, llvm-bugs@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 reference. 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 llvm::RemapInstruction. 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 r265631): http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160404/345617.html 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.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs