[llvm-bugs] [Bug 49957] New: PAC+BTI+B-KEY inefficient codegen

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Apr 13 15:22:49 PDT 2021


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

            Bug ID: 49957
           Summary: PAC+BTI+B-KEY inefficient codegen
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: AArch64
          Assignee: unassignedbugs at nondot.org
          Reporter: eugeni.stepanov at gmail.com
                CC: arnaud.degrandmaison at arm.com,
                    llvm-bugs at lists.llvm.org, smithp352 at googlemail.com,
                    Ties.Stuij at arm.com

int f() {
  g();
  return 42;
}

With -mbranch-protection=standard,
_Z1fv():
   0:   d503233f        paciasp
   4:   a9bf7bfd        stp     x29, x30, [sp, #-16]!

With -mbranch-protection=bti+pac-ret+b-key,
_Z1fv():
   0:   d503245f        bti     c
   4:   d503237f        pacibsp
   8:   a9bf7bfd        stp     x29, x30, [sp, #-16]!

Seems trivial, AArch64BranchTargets::addBTI needs to skip over EMITBKEY.

-- 
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/20210413/ce3b1fa4/attachment.html>


More information about the llvm-bugs mailing list