mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
[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
This commit is contained in:
parent
b9a4cf95b0
commit
db78542b9d
@ -346,7 +346,9 @@ bool X86ExpandPseudo::ExpandMI(MachineBasicBlock &MBB,
|
||||
|
||||
// Copy the input argument of the pseudo into the argument of the
|
||||
// actual instruction.
|
||||
TII->copyPhysReg(MBB, MBBI, DL, X86::RBX, InArg.getReg(), InArg.isKill());
|
||||
// NOTE: We don't copy the kill flag since the input might be the same reg
|
||||
// as one of the other operands of LCMPXCHG16B.
|
||||
TII->copyPhysReg(MBB, MBBI, DL, X86::RBX, InArg.getReg(), false);
|
||||
// Create the actual instruction.
|
||||
MachineInstr *NewInstr = BuildMI(MBB, MBBI, DL, TII->get(X86::LCMPXCHG16B));
|
||||
// Copy the operands related to the address.
|
||||
|
@ -1,5 +1,5 @@
|
||||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
||||
; RUN: llc < %s -mtriple=x86_64-pc-windows-msvc19.11.0 -mattr=+avx,+cx16 | FileCheck %s
|
||||
; RUN: llc < %s -verify-machineinstrs -mtriple=x86_64-pc-windows-msvc19.11.0 -mattr=+avx,+cx16 | FileCheck %s
|
||||
|
||||
%struct.TestStruct = type { %union.Int128 }
|
||||
%union.Int128 = type { i128 }
|
||||
|
Loading…
Reference in New Issue
Block a user