[LLVMbugs] [Bug 19680] New: [ARM64] CSINC is not generated when there is ZEXT between SETCC and ADD

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed May 7 10:43:15 PDT 2014


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

            Bug ID: 19680
           Summary: [ARM64] CSINC is not generated when there is ZEXT
                    between SETCC and ADD
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: weimingz at codeaurora.org
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

For exmaple:
define i64 @foo19(i64 %a, i64 %b, i64 %c) {
entry:
; CHECK-LABEL: foo19:
; CHECK: csinc x0, x2, x2
; CHECK-NOT: add
  %cmp = icmp ult i64 %a, %b
  %inc = zext i1 %cmp to i64
  %inc.c = add i64 %inc, %c
  ret i64 %inc.c
}

Currently, it emits:
    cmp    x0, x1
    csinc    w8, wzr, wzr, hs
    add    x0, x2, w8, uxtw
    ret


We expect:
    cmp    x0, x1
    csinc    x0, x2, x2, cs
    ret

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140507/72e0dd10/attachment.html>


More information about the llvm-bugs mailing list