[AMDGPU][SIFoldOperands] Clear kills when folding COPY
authorCarl Ritson <carl.ritson@amd.com>
Thu, 28 Jul 2022 02:43:46 +0000 (11:43 +0900)
committerCarl Ritson <carl.ritson@amd.com>
Thu, 28 Jul 2022 02:57:55 +0000 (11:57 +0900)
commitdbda30e2947b0c1339bb080b21475b2a44ca5fd5
tree0e38feada07378a7babb0f4652372cd8e065c006
parent76e951e80307d26da260a73d8209417d9bb5e9f9
[AMDGPU][SIFoldOperands] Clear kills when folding COPY

Clear all kill flags on source register when folding a COPY.
This is necessary because the kills may now be out of order with the uses.

Reviewed By: foad

Differential Revision: https://reviews.llvm.org/D130622
llvm/lib/Target/AMDGPU/SIFoldOperands.cpp
llvm/test/CodeGen/AMDGPU/si-fold-copy-kills.mir [new file with mode: 0644]