http://llvm.org/bugs/show_bug.cgi?id=5049

           Summary: incorrect asserting conditions in TargetLowering.h
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Target Description Classes
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


setLoadExtAction(ISD::SEXTLOAD, MVT::v2f64, Expand)
or
setLoadExtAction(ISD::SEXTLOAD, MVT::v4f64, Expand) causes this assert to
trigger:

    assert((unsigned)VT.SimpleTy < sizeof(LoadExtActions[0])*4 &&
           ExtType < array_lengthof(LoadExtActions) &&
           "Table isn't big enough!");

@ line 982 because the type used to be uint32_t.

The problem comes that sizeof(LoadExtActions[0]) == 8 and 8 * 4 = 32, but both
v2f64 and v4f64 have ID's 32 and 33 respectively, causing this assert to
trigger.

The correct method of doing this assert should be
assert((unsigned)VT.SimpleTy < LAST_VALUETYPE &&
ExtType < array_lengthof(LoadExtActions) &&
           "Table isn't big enough!");

Other asserts that also will be triggered because of this are in
setTruncStoreAction, setConvertAction, setCondCodeAction, when the MemVT ==
(v2f64 || v4f64).

The functions setIndexedLoadAction and setIndexedStoreAction actually get this
correct, so someone has hit this assert before but neglected to updated all
asserts in the file.


-- 
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to