[PATCH] D130622: [AMDGPU][SIFoldOperands] Clear kills when folding COPY

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 27 09:46:40 PDT 2022


foad accepted this revision.
foad added a reviewer: hliao.
foad added a comment.
This revision is now accepted and ready to land.

Anyway the patch looks OK to me, given that this code does not fire very often. One day we should take a closer look at whether it is still needed, or whether PeepholeOptimizer could be improved instead. (Or perhaps it already has been? I see D87939 <https://reviews.llvm.org/D87939> landed since this code was written.)



================
Comment at: llvm/lib/Target/AMDGPU/SIFoldOperands.cpp:741
+      // Remove kill flags as kills may now be out of order with uses.
+      for (auto &Use : MRI->use_operands(OpToFold.getReg())) {
+        Use.setIsKill(false);
----------------
Don't need the braces.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130622/new/

https://reviews.llvm.org/D130622



More information about the llvm-commits mailing list