[PATCH] D22198: AMDGPU: Do not clobber SCC in SIWholeQuadMode

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 21 15:36:13 PDT 2016


arsenm added inline comments.

================
Comment at: include/llvm/CodeGen/LiveIntervalAnalysis.h:395-400
@@ -394,1 +394,8 @@
 
+    /// removeRegUnit - Remove computed live range for Unit. Subsequent uses
+    /// should rely on on-demand recomputation.
+    void removeRegUnit(unsigned Unit) {
+      delete RegUnitRanges[Unit];
+      RegUnitRanges[Unit] = nullptr;
+    }
+
----------------
This should probably be a separate patch

================
Comment at: lib/Target/AMDGPU/SIWholeQuadMode.cpp:531-535
@@ +530,7 @@
+              SaveReg)
+          .addImm(1)
+          .addImm(0);
+  MachineInstr *Restore =
+      BuildMI(MBB, Before, DebugLoc(), TII->get(AMDGPU::S_CMP_GT_U32))
+          .addReg(SaveReg)
+          .addImm(0);
----------------
I think this should use -1 instead of 1, and use compare != 0 to be more canonical


https://reviews.llvm.org/D22198





More information about the llvm-commits mailing list