[LLVMbugs] [Bug 1675] New: instcombine neg(zext(bool)) to sext(bool)

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Mon Sep 17 19:04:18 PDT 2007


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

           Summary: instcombine neg(zext(bool)) to sext(bool)
           Product: libraries
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Scalar Optimizations
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: nicholas at mxc.ca
                CC: llvmbugs at cs.uiuc.edu


Instruction combiner isn't simplifying this:

  define i32 @f(i32 %x, i32 %y) {
    %A = icmp ne i32 %x, %y
    %B = zext i1 %A to i32
    %C = sub i32 0, %B
    ret i32 %C
  }

which could become:

  define i32 @f(i32 %x, i32 %y) {
    %A = icmp ne i32 %x, %y
    %B = sext i1 %A to i32
    ret i32 %B
  }

This example is reduced from mediabench/gsm/toast.


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