Commit 32090778 authored by Yuanfang Chen's avatar Yuanfang Chen Committed by Tom Stellard
Browse files

[X86] make sure POP has implicit def/use of stack pointer when materializing...

[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

(cherry picked from commit ece79f47)
parent dc94773a
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment