[LLVMbugs] [Bug 2721] New: -indvars and -loop-unroll do not agree on names ( preventing -O2 option)

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Mon Aug 25 17:18:30 PDT 2008


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

           Summary: -indvars and -loop-unroll do not agree on names
                    (preventing -O2 option)
           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: yingyi.liang at gmail.com
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=1963)
 --> (http://llvm.org/bugs/attachment.cgi?id=1963)
The C source code triggers the bug.

-loop-unroll tends to look for induction variables named "indvar.1", "indvar.2"
etc. but -indvars generates "indvar.next" "indvar.next3"... Which leads to an
assertion failure:

lib/Support/StringMap.cpp:177: void
llvm::StringMapImpl::RemoveKey(llvm::StringMapEntryBase*): Assertion `V == V2
&& "Didn't find key?"' failed.


To reproduce the error:
1. compile the attached code into bitcode with -O0 or -O1;
2. optimize it with "-scalarrepl -loop-rotate -instcombine -indvars
-loop-unroll".

All of the five optimization passes are needed to reproduce the error. This bug
should be fixed as soon as possible since it prevents -O2 option from
working...This is the reason why llvm-gcc 4.2-2.3 won't compile with the
lastest version of llvm in the svn repository...

The attached example was refined from gcc/libgcc2.c in the llvm-gcc source
tree.


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