[PATCH] D15622: AMDGPU: fix overlapping copies in copyPhysReg

Tom Stellard via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 18 13:23:19 PST 2015


tstellarAMD added inline comments.

================
Comment at: lib/Target/AMDGPU/SIInstrInfo.cpp:432-435
@@ -430,2 +431,6 @@
 
-  while (unsigned SubIdx = *SubIndices++) {
+  if (RI.getHWRegIndex(DestReg) <= RI.getHWRegIndex(SrcReg))
+    Forward = true;
+  else
+    Forward = false;
+
----------------
Is there some reason why you used a variable here and didn't put this condition directly in the if() below?


http://reviews.llvm.org/D15622





More information about the llvm-commits mailing list