[all-commits] [llvm/llvm-project] ee0f49: [SROA] Avoid unnecessary stack realignment when re...
zhouguangyuan0718 via All-commits
all-commits at lists.llvm.org
Thu Sep 17 01:10:58 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ee0f498b01eaa819618bc4825a6ad1a37f5ef2f4
https://github.com/llvm/llvm-project/commit/ee0f498b01eaa819618bc4825a6ad1a37f5ef2f4
Author: zhouguangyuan0718 <zhouguangyuan.xian at gmail.com>
Date: 2026-09-17 (Thu, 17 Sep 2026)
Changed paths:
M llvm/lib/Transforms/Scalar/SROA.cpp
A llvm/test/Transforms/SROA/struct-to-vector-stack-alignment.ll
Log Message:
-----------
[SROA] Avoid unnecessary stack realignment when rewriting allocas (#222967)
SROA can introduce dynamic stack realignment when rewriting an aggregate
alloca as a vector. On SystemZ (`S64`), a five-pointer structure with
alignment 8 becomes `<5 x ptr>` with alignment 64, adding an alignment
mask and extra stack-frame setup instructions.
Create replacement allocas with the alignment inherited from the
original alloca and partition offset, then use `tryEnforceAlignment` to
request the preferred type alignment. This reuses the existing
stack-alignment check: when a natural stack alignment is specified,
promotions beyond it are rejected. Stronger inherited alignments are
preserved.
Add SROA-only regression coverage for `S64`, `S128`, unspecified natural
stack alignment, and explicit stronger alignments. Existing SROA,
debug-info, and NVPTX tests retain their original RUN lines and checks,
including the NVPTX vector stores.
Fixes #222966
Assisted-by: OpenAI Codex
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