[LLVMbugs] [Bug 1178] NEW: Sometimes AsmPrinter::PrintSpecial assigns the same uid for two Machine Instructions
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Mon Feb 5 08:52:59 PST 2007
http://llvm.org/bugs/show_bug.cgi?id=1178
Summary: Sometimes AsmPrinter::PrintSpecial assigns the same uid
for two Machine Instructions
Product: libraries
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Common Code Generator Code
AssignedTo: unassignedbugs at nondot.org
ReportedBy: lauro.venancio at gmail.com
The code:
void AsmPrinter::PrintSpecial(const MachineInstr *MI, const char *Code) {
[...]
} else if (!strcmp(Code, "uid")) {
// Assign a unique ID to this machine instruction.
static const MachineInstr *LastMI = 0;
static unsigned Counter = 0U-1;
// If this is a new machine instruction, bump the counter.
if (LastMI != MI) { ++Counter; LastMI = MI; }
O << Counter;
} else {
[...]
}
**************************
Comparison (LastMI != MI) is incorrect. Machine Instructions of different
Machine Functions can have the same address.
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
More information about the llvm-bugs
mailing list