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: [email protected]
          Reporter: [email protected]
                CC: [email protected],
                    [email protected], [email protected],
                    [email protected]

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.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to