[PATCH] D21438: AMDGPU/SI: Propagate the Kill flag in storeRegToStackSlot and eliminateFrameIndex

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 16 11:24:18 PDT 2016


arsenm added inline comments.

================
Comment at: lib/Target/AMDGPU/SIRegisterInfo.cpp:460
@@ +459,3 @@
+    if (i + 1 == e) {
+      SOffsetRegState |= (Scavenged ? RegState::Kill : 0);
+      // The last implicit use carries the "Kill" flag.
----------------
This can also use getKillRegState

================
Comment at: lib/Target/AMDGPU/SIRegisterInfo.cpp:512
@@ -505,1 +511,3 @@
+      // SubReg carries the "Kill" flag when SubReg == SuperReg.
+      unsigned SubKillState = (NumSubRegs == 1) ? getKillRegState(IsKill) : 0;
       for (unsigned i = 0, e = NumSubRegs; i < e; ++i) {
----------------
You can move the other condition into getKillRegState


http://reviews.llvm.org/D21438





More information about the llvm-commits mailing list