[LLVMbugs] [Bug 2389] New: instcombine should turn add i1 -> xor i1

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sat May 31 01:36:00 PDT 2008


           Summary: instcombine should turn add i1 -> xor i1
           Product: libraries
           Version: 1.0
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Scalar Optimizations
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: sabre at nondot.org
                CC: llvmbugs at cs.uiuc.edu

Silly testcase:

define i32 @test(i32 %r) {
        %s = icmp eq i32 %r, 0          ; <i1> [#uses=2]
        %t = add i1 %s, %s              ; <i1> [#uses=3]
        %u = zext i1 %t to i32          ; <i32> [#uses=2]
        br i1 %t, label %A, label %B

A:              ; preds = %0
        ret i32 %u

B:              ; preds = %0
        %v = select i1 %t, i32 %r, i32 %u               ; <i32> [#uses=1]
        ret i32 %v

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