[LLVMbugs] [Bug 4732] codegen pass breaks machine cfg

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Tue Aug 18 11:01:55 PDT 2009


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


Dale Johannesen <dalej at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dalej at apple.com
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |




--- Comment #5 from Dale Johannesen <dalej at apple.com>  2009-08-18 13:01:54 ---
"invalid cfg"?  You didn't think so when reviewing 78351, which introduced the
simpler CFG, so I'm skeptical this is well defined.  There are lots of other
places in that area that remove duplicate edges, and IMO that is the way it
should be throughout, although right now only BranchFolding does that.  It is
more efficient, possibly noticeably so in the case of large switches.

The real problem here is that the redundant conditional branches were not
removed when the edges were fixed up.  That's because AnalyzeBranch is not
handling JNE followed by JLE, and there are probably other bugs (missing
optimizations at least) lurking that are associated with that.  Its comments
say:

    // If [the branch conditions] differ, see if they fit one of the known
patterns.
    // Theoretically we could handle more patterns here, but
    // we shouldn't expect to see them if instruction selection
    // has done a reasonable job.

so where did JNE followed by JLE come from?


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