[LLVMbugs] [Bug 5107] New: Division by zero in SimpleRegisterCoalescing:: isWinToJoinCrossClass()

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Wed Sep 30 06:13:44 PDT 2009


           Summary: Division by zero in
           Product: libraries
           Version: 2.6
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: major
          Priority: P2
         Component: Backend: X86
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: DevOmem at web.de
                CC: llvmbugs at cs.uiuc.edu

Crash due to vivision by zero in

SmallSize can be some times zero and this will crash LLVM.

Solution for now is to add this 

if(LargeSize<=0) LargeSize=1;

if(SmallSize<=0) SmallSize=1;


if (SmallSize > Threshold || LargeSize > Threshold)
    if ((float)std::distance(mri_->use_begin(SmallReg),mri_->use_end()) /
SmallSize <
        (float)std::distance(mri_->use_begin(LargeReg),mri_->use_end()) /

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