[all-commits] [llvm/llvm-project] 662024: [X86] Don't copy kill flag when expanding LCMPXCHG...

topperc via All-commits all-commits at lists.llvm.org
Fri Oct 9 11:56:43 PDT 2020


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

  Changed paths:
    M llvm/lib/Target/X86/X86ExpandPseudo.cpp
    M llvm/test/CodeGen/X86/pr42064.ll

  Log Message:
  -----------
  [X86] Don't copy kill flag when expanding LCMPXCHG16B_SAVE_RBX

The expansion code creates a copy to RBX before the real LCMPXCHG16B.
It's possible this copy uses a register that is also used by the
real LCMPXCHG16B. If we set the kill flag on the use in the copy,
then we'll fail the machine verifier on the use on the LCMPXCHG16B.

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


  Commit: f34bb06935aa3bab353d70d515b767fdd2f5625c
      https://github.com/llvm/llvm-project/commit/f34bb06935aa3bab353d70d515b767fdd2f5625c
  Author: Craig Topper <craig.topper at intel.com>
  Date:   2020-10-09 (Fri, 09 Oct 2020)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp

  Log Message:
  -----------
  [X86] When expanding LCMPXCHG16B_NO_RBX in EmitInstrWithCustomInserter, directly copy address operands instead of going through X86AddressMode.

I suspect getAddressFromInstr and addFullAddress are not handling
all addresses cases properly based on a report from MaskRay.

So just copy the operands directly. This should be more efficient
anyway.


Compare: https://github.com/llvm/llvm-project/compare/466c8296f20f...f34bb06935aa


More information about the All-commits mailing list