[llvm-bugs] [Bug 40055] New: [AArch64] Suboptimal immediate encoding with add/sub

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Dec 17 09:06:52 PST 2018


            Bug ID: 40055
           Summary: [AArch64] Suboptimal immediate encoding with add/sub
           Product: libraries
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: AArch64
          Assignee: unassignedbugs at nondot.org
          Reporter: amanieu at gmail.com
                CC: arnaud.degrandmaison at arm.com,
                    llvm-bugs at lists.llvm.org, peter.smith at linaro.org,
                    Ties.Stuij at arm.com

This IR:

    %2 = sub i64 %0, 72340172838076673 ; 0x0101010101010101

Generates the following assembly:

        mov     x8, #-72340172838076674
        movk    x8, #65279
        add     x0, x0, x8

However the immediate can be encoded in a single instruction if it is not

        mov     x8, #72340172838076673
        sub     x0, x0, x8

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/20181217/b3316852/attachment.html>

More information about the llvm-bugs mailing list