[all-commits] [llvm/llvm-project] ece79f: [X86] make sure POP has implicit def/use of stack ...

Yuanfang Chen via All-commits all-commits at lists.llvm.org
Mon Mar 30 09:25:49 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: ece79f47083babcabde3700c67b90ef19967a5b3
      https://github.com/llvm/llvm-project/commit/ece79f47083babcabde3700c67b90ef19967a5b3
  Author: Yuanfang Chen <yuanfang.chen at sony.com>
  Date:   2020-03-30 (Mon, 30 Mar 2020)

  Changed paths:
    M llvm/lib/Target/X86/X86InstrInfo.cpp
    M llvm/test/CodeGen/X86/materialize.ll

  Log Message:
  -----------
  [X86] make sure POP has implicit def/use of stack pointer when materializing 8-bit immediates for minsize

Summary:
Otherwise PostRA list scheduler may reorder instruction, such as

schedule this
'''
pushq  $0x8
pop    %rbx
lea    0x2a0(%rsp),%r15
'''
to
'''
pushq  $0x8
lea    0x2a0(%rsp),%r15
pop    %rbx
'''
by mistake. The patch is to prevent this to happen by making sure POP has
implicit use of SP.

Reviewers: craig.topper

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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




More information about the All-commits mailing list