This is an archive of the discontinued LLVM Phabricator instance.

[TwoAddressInstruction] Improve tests for register killed by instruction
ClosedPublic

Authored by foad on Mar 29 2023, 9:26 AM.

Details

Summary

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.

Diff Detail

Event Timeline

foad created this revision.Mar 29 2023, 9:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 29 2023, 9:26 AM
foad requested review of this revision.Mar 29 2023, 9:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 29 2023, 9:26 AM
foad added inline comments.Mar 29 2023, 9:28 AM
llvm/test/CodeGen/AArch64/sve-fixed-length-limit-duplane.ll
13

This mov is removed.

37

This mov is removed.

llvm/test/CodeGen/AArch64/sve-streaming-mode-fixed-length-limit-duplane.ll
34

This mov is removed.

llvm/test/CodeGen/AMDGPU/mad-mix-lo.ll
1193

This mov is removed.

1205

This mov is removed.

arsenm accepted this revision.Mar 30 2023, 10:52 AM

LGTM. Seems like an error in the kill flag insertion

This revision is now accepted and ready to land.Mar 30 2023, 10:52 AM
foad added a comment.Mar 30 2023, 11:00 AM

LGTM. Seems like an error in the kill flag insertion

You mean all uses of reg in one instruction should be marked as killed if any of them are? I did wonder about that but I bet it would require a lot of fixups elsewhere - and hopefully kill flags will go away instead.

This revision was landed with ongoing or failed builds.Mar 30 2023, 11:20 AM
This revision was automatically updated to reflect the committed changes.