[LLVMbugs] [Bug 1931] New: Invalid division instcombine

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sat Jan 19 20:49:33 PST 2008


           Summary: Invalid division instcombine
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: sharparrow1 at yahoo.com
                CC: llvmbugs at cs.uiuc.edu

define i32 @fold(i32 %a) {
%b = sdiv i32 %a, -1
%c = sdiv i32 %b, -2
ret i32 %c

gets combined into

define i32 @fold(i32 %a) nounwind  {
        %c = sdiv i32 %a, 2             ; <i32> [#uses=1]
        ret i32 %c

by opt -std-compile-opts.  These functions are not equivalent!

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