[LLVMbugs] [Bug 2855] New: simplifycfg aborts

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Fri Oct 3 09:09:37 PDT 2008


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

           Summary: simplifycfg aborts
           Product: tools
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: opt
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: rafael.espindola at gmail.com
                CC: llvmbugs at cs.uiuc.edu, nlewycky at google.com


opt -simplifycfg bugpoint-passes.bc  -o opt.bc -f
------------------------------------------------------------
PHI nodes not grouped at top of basic block!
        %iftmp.1.0 = phi i1 [ true, %bb7 ], [ false, %bb3 ]             ; <i1>
[#uses=1]
label %bb7
Instruction does not dominate all uses!
        %iftmp.1.0 = phi i1 [ true, %bb7 ], [ false, %bb3 ]             ; <i1>
[#uses=1]
        %. = select i1 %iftmp.1.0, i32 %2, i32 %8               ; <i32>
[#uses=1]
Broken module found, compilation aborted!
------------------------------------------------------------

This is a reduction of a C++ test:
-----------------------------------------------------------
int f(int *b, int f) {
  int s = 0;

  int c;
  for (;
       ;
       ) {
    c=b[s++];
    if(c) {
      int __c2;
      if(s<f && (__c2=b[s])) {
        ++s;
        c=c+__c2;
      }
    }
  }
}
------------------------------------------------------


cc1plus -O2 testcase.ii -o test.s  
 int f(int*, int)
Analyzing compilation unitPerforming interprocedural optimizations
Assembling functions:
 int f(int*, int)cc1plus:
/usr/local/google/tmp/crosstool.t25222/gcc-llvm-glibc-2.3.6-grte/rpmbuild/BUILD/crosstoolv12-gcc-llvm-glibc-2.3.6-grte-0.1/llvm/lib/CodeGen/LiveVariables.cpp:129:
void llvm::LiveVariables::HandleVirtRegUse(unsigned int,
llvm::MachineBasicBlock*, llvm::MachineInstr*): Assertion `MRI->getVRegDef(reg)
&& "Register use before def!"' failed.


-- 
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