[all-commits] [llvm/llvm-project] 74d3ba: [X86] Don't zero out %eax if both %al and %ah are ...

Bill Wendling via All-commits all-commits at lists.llvm.org
Mon Jan 9 12:11:46 PST 2023


  Branch: refs/heads/release/15.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 74d3ba1af5c09b85331c90105c461484762ee3e4
      https://github.com/llvm/llvm-project/commit/74d3ba1af5c09b85331c90105c461484762ee3e4
  Author: Bill Wendling <morbo at google.com>
  Date:   2023-01-09 (Mon, 09 Jan 2023)

  Changed paths:
    M llvm/lib/CodeGen/PrologEpilogInserter.cpp
    A llvm/test/CodeGen/X86/zero-call-used-regs-i386.ll

  Log Message:
  -----------
  [X86] Don't zero out %eax if both %al and %ah are used

The iterator over super and sub registers doesn't include both 8-bit
registers in its list. So if both registers are used and only one of
them is live on return, then we need to make sure that the other 8-bit
register is also marked as live and not zeroed out.

Reviewed By: nickdesaulniers

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

(cherry picked from commit 14d4cddc5506fb0fd3c4ac556b4edd970aa151eb)




More information about the All-commits mailing list