[X86] Improve selection of the mov instruction in FrameLowering
authorErik Desjardins <erikdesjardinspublic@gmail.com>
Mon, 3 Jan 2022 19:09:50 +0000 (11:09 -0800)
committerCraig Topper <craig.topper@sifive.com>
Mon, 3 Jan 2022 19:10:16 +0000 (11:10 -0800)
commita390c9905d4d1e7a7437fc1ab57f720c06618d79
treeed366ee6e1d52125619699905b3778727ec084ba
parent95cf30401cecf63897d203c6ee6d54a988aaff67
[X86] Improve selection of the mov instruction in FrameLowering

MOV64ri results in a significantly longer encoding, and use of this
operator is fairly avoidable as we can always check the size of the
immediate we're using.

This is an updated version of D99045.

Co-authored-by: Simonas Kazlauskas <git@kazlauskas.me>
Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D116458
llvm/lib/Target/X86/X86FrameLowering.cpp
llvm/test/CodeGen/X86/segmented-stacks-dynamic.ll
llvm/test/CodeGen/X86/segmented-stacks.ll