[LLVMbugs] [Bug 3146] New: intrinsics declarations, when passed through llc -march=cpp , fail verification

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sun Nov 30 12:00:38 PST 2008


           Summary: intrinsics declarations, when passed through llc -
                    march=cpp, fail verification
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: flld0 at greynode.net
                CC: llvmbugs at cs.uiuc.edu

When an intrinsic like llvm.atomic.load.sub is declared in a module, and that
module is passed through the C++ backend and the resulting code run to
re-generate the module, the resulting declaration fails verification. In
particular, the assert at Verifier.cpp:1536 fails, as the function attributes
on the re-generated declaration aren't right.

The problem seems to be at CPPBackend.cpp:440, where the index for the function
attributes is truncated to 16 bits - the original data being an unsigned as
declared at Attributes.h:94.  The case in question being function attributes,
the index before serialization is ~0U, in serialized form is 65535, in
re-constituted form is 65535, and is then compared to attributes built
internally using ~0U again causing the failure. I think the declaration at
CPPBackend.cpp:440 should be an unsigned.

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list