[llvm-bugs] [Bug 27328] New: [ARM] missed pattern for and-not + compare (bics)

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Apr 12 11:41:14 PDT 2016


            Bug ID: 27328
           Summary: [ARM] missed pattern for and-not + compare (bics)
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: ARM
          Assignee: unassignedbugs at nondot.org
          Reporter: spatel+llvm at rotateright.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

define i1 @andnot_cmp(i32 %x, i32 %y) {
  %noty = xor i32 %y, -1
  %and = and i32 %x, %noty
  %cmp = icmp eq i32 %and, 0
  ret i1 %cmp

I don't know ARM very well, but couldn't this be "bics"?

$ ./llc -o - andn.ll -mtriple=armv7-apple-darwin -mcpu=cortex-a8
@ BB#0:
    mvn    r2, r1
    mov    r1, #0
    tst    r0, r2
    movweq    r1, #1
    mov    r0, r1
    bx    lr

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/20160412/42b98384/attachment.html>

More information about the llvm-bugs mailing list