[TwoAddressInstruction] Improve tests for register killed by instruction
authorJay Foad <jay.foad@amd.com>
Wed, 29 Mar 2023 16:13:52 +0000 (17:13 +0100)
committerJay Foad <jay.foad@amd.com>
Thu, 30 Mar 2023 18:20:03 +0000 (19:20 +0100)
commiteffb7ab6c24c997b10f2555b8b860b9a09673c0f
treef874f6806a580136e1d33783be980fd7f64d1906
parente00a8d081d789cac606cf0749c332c4632132820
[TwoAddressInstruction] Improve tests for register killed by instruction

Define and use a MachineOperand overload of isPlainlyKilled. This
improves codegen in a couple of tests because it catches the case where
MO does not kill Reg but another operand of the same instruction does.

Differential Revision: https://reviews.llvm.org/D147167
llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
llvm/test/CodeGen/AArch64/sve-fixed-length-limit-duplane.ll
llvm/test/CodeGen/AArch64/sve-streaming-mode-fixed-length-limit-duplane.ll
llvm/test/CodeGen/AMDGPU/mad-mix-lo.ll
llvm/test/CodeGen/AVR/shift32.ll
llvm/test/CodeGen/X86/pr32284.ll