[all-commits] [llvm/llvm-project] 68e1a8: [X86] Defer the creation of LCMPXCHG16B_SAVE_RBX u...

topperc via All-commits all-commits at lists.llvm.org
Wed Oct 7 17:01:13 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 68e1a8d20795802077987529e1268c184d749564
      https://github.com/llvm/llvm-project/commit/68e1a8d20795802077987529e1268c184d749564
  Author: Craig Topper <craig.topper at intel.com>
  Date:   2020-10-07 (Wed, 07 Oct 2020)

  Changed paths:
    M llvm/lib/Target/X86/X86ExpandPseudo.cpp
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/lib/Target/X86/X86ISelLowering.h
    M llvm/lib/Target/X86/X86InstrCompiler.td
    M llvm/lib/Target/X86/X86InstrInfo.td
    A llvm/test/CodeGen/X86/pr42064.ll

  Log Message:
  -----------
  [X86] Defer the creation of LCMPXCHG16B_SAVE_RBX until finalize-isel

We need to use LCMPXCHG16B_SAVE_RBX if RBX/EBX is being used as
the frame pointer. We previously checked for this during type
legalization, but that's too early to know for sure if the base
pointer is needed.

This patch adds a new pseudo instruction to emit from isel that
uses a virtual register for the RBX input. Then we use the custom
inserter hook to emit LCMPXCHG16B if RBX isn't needed as a base
pointer or LCMPXCHG16B_SAVE_RBX if it is.

Fixes PR42064.

Reviewed By: pengfei

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




More information about the All-commits mailing list