[all-commits] [llvm/llvm-project] 21f23a: [SelectionDAG] Clamp stack alignment for memset, m...

HaohaiWen via All-commits all-commits at lists.llvm.org
Wed Oct 26 01:45:51 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 21f23a37c6f1ba3f5ee34d505e527b1c6af8f99f
      https://github.com/llvm/llvm-project/commit/21f23a37c6f1ba3f5ee34d505e527b1c6af8f99f
  Author: Haohai Wen <haohai.wen at intel.com>
  Date:   2022-10-26 (Wed, 26 Oct 2022)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
    M llvm/test/CodeGen/AMDGPU/flat-scratch.ll
    M llvm/test/CodeGen/X86/memset-sse-stack-realignment.ll
    M llvm/test/CodeGen/X86/memset.ll
    M llvm/test/CodeGen/X86/pr42064.ll
    M llvm/test/DebugInfo/COFF/frameproc-flags.ll

  Log Message:
  -----------
  [SelectionDAG] Clamp stack alignment for memset, memmove

memcpy has clamped dst stack alignment to NaturalStackAlignment if
hasStackRealignment is false. We should also clamp stack alignment
for memset and memmove. If we don't clamp, SelectionDAG may first
do tail call optimization which requires no stack realignment. Then
memmove, memset in same function may be lowered to load/store with
larger alignment leading to PEI emit stack realignment code which
is absolutely not correct.

Reviewed By: LuoYuanke

Differential Revision: https://reviews.llvm.org/D136456




More information about the All-commits mailing list