[all-commits] [llvm/llvm-project] cda6b0: [X86] Make sure we do not clobber RBX with mwaitx ...

goussepi via All-commits all-commits at lists.llvm.org
Wed Aug 26 03:21:00 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: cda6b0924257f162cc9299dae2d4bb134fac5d38
      https://github.com/llvm/llvm-project/commit/cda6b0924257f162cc9299dae2d4bb134fac5d38
  Author: Pierre Gousseau <pierre.gousseau at sony.com>
  Date:   2020-08-26 (Wed, 26 Aug 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/base-pointer-and-mwaitx.ll

  Log Message:
  -----------
  [X86] Make sure we do not clobber RBX with mwaitx when used as a base
pointer.

mwaitx uses EBX as one of its argument.
Using this instruction clobbers RBX as it is defined to hold one of the
input. When the backend uses dynamically allocated stack, RBX is used as
a reserved register for the base pointer.

This patch is adapted from @qcolombet patch for cmpxchg at r263325.

This fixes PR43528.

Reviewed By: craig.topper

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




More information about the All-commits mailing list