[all-commits] [llvm/llvm-project] 9b8fcd: [X86] Fix cmp order in probing BuildStackAlignAND

Josh Stone via All-commits all-commits at lists.llvm.org
Tue Dec 13 12:11:28 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9b8fcd04ef64cbe124f30b8cb49633b785b840d7
      https://github.com/llvm/llvm-project/commit/9b8fcd04ef64cbe124f30b8cb49633b785b840d7
  Author: Josh Stone <jistone at redhat.com>
  Date:   2022-12-13 (Tue, 13 Dec 2022)

  Changed paths:
    M llvm/lib/Target/X86/X86FrameLowering.cpp
    M llvm/test/CodeGen/X86/stack-clash-large-large-align.ll
    M llvm/test/CodeGen/X86/stack-clash-small-large-align.ll

  Log Message:
  -----------
  [X86] Fix cmp order in probing BuildStackAlignAND

Due to reversed arguments, the loop start was almost always skipping the
whole loop, since FinalStackProbed is probably less than StackPtr for
large alignments. The intent was to skip the loop if the first sub on
StackPtr made it less than FinalStackProbed already, so flip it.

Reviewed By: serge-sans-paille

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




More information about the All-commits mailing list