On Tue, Feb 17, 2026 at 6:53 AM H.J. Lu <[email protected]> wrote:
>
> Since the same hard register may be used for both non-stack access and
> stack access, change ix86_find_max_used_stack_alignment to update stack
> alignment only if the hard register in the set basic block, which
> dominates the use basic block, accesses stack.

This sentence is really hard to parse. I guess it is more clear to say:

"The same hard register may be used for both stack and non-stack
accesses. Update ix86_find_max_used_stack_alignment to adjust stack
alignment only when a hard register used for a stack access is defined
in a basic block that dominates the block where it is used."

+/* Return true if hard register REGNO set in the basic block, which
+   dominates basic block BB, accesses stack.  */
+

Return true if the hard register REGNO used for a stack access is
defined in a basic block that dominates the block where it is used.

+    if (TEST_HARD_REG_BIT (hard_stack_slot_access, regno)
+        || ix86_access_stack_p (regno, BLOCK_FOR_INSN (insn),
+                    set_up_by_prologue, prologue_used))
+      {
+        /* Update stack alignment if REGNO accesses stack.  */

Update stack alignment if REGNO is used for stack access.

+        note_stores (insn, ix86_update_stack_alignment,
+             &data);

This can be in one line.

Just a faint rubber-stamp LGTM otherwise - you are the expert in this area.

Thanks,
Uros.

Reply via email to