[all-commits] [llvm/llvm-project] b1dcf7: [X86][APX] Fix issue of push2/pop2 instr with stac...

Feng Zou via All-commits all-commits at lists.llvm.org
Mon Jun 23 23:22:36 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b1dcf78378aaded19b47886cece991cee3441207
      https://github.com/llvm/llvm-project/commit/b1dcf78378aaded19b47886cece991cee3441207
  Author: Feng Zou <feng.zou at intel.com>
  Date:   2025-06-24 (Tue, 24 Jun 2025)

  Changed paths:
    M llvm/lib/Target/X86/X86FrameLowering.cpp
    A llvm/test/CodeGen/X86/apx/pp2-with-stack-clash-protection.ll

  Log Message:
  -----------
  [X86][APX] Fix issue of push2/pop2 instr with stack clash protection (#145303)

When -stack-clash-protection option is specified and APX push2pop2 is
enabled, there will be two calls to emitSPUpdate function which emits
two STACKALLOC_W_PROBING pseudo instructions. The pseudo instruction for
push2 padding is silently ignored which leads to the stack misaligned to
16 bytes and GP exception in runtime. Fixed by directly emitting "push
%rax" instruction for push2 padding, instead of calling emitSPUpdate.
There was a similar issue on https://reviews.llvm.org/D150033.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list