[llvm-bugs] [Bug 31575] New: [AVR] Optimize 16-bit comparisions with zero

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Jan 7 16:20:16 PST 2017


https://llvm.org/bugs/show_bug.cgi?id=31575

            Bug ID: 31575
           Summary: [AVR] Optimize 16-bit comparisions with zero
           Product: libraries
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: AVR
          Assignee: unassignedbugs at nondot.org
          Reporter: dylanmckay34 at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Currently when we try and perform a 16-bit comparision with zero, we generate
the following code:

ldi r24, 0
ldi r25, 0
cp  r26, r24
cpc r27, r25
breq LBB0_4

We can simplify this to

ldi r24, 0
cp  r26, r24
cpc r27, r24

And save a register

-- 
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/20170108/48d78c83/attachment-0001.html>


More information about the llvm-bugs mailing list