[PATCH] D15622: AMDGPU: fix overlapping copies in copyPhysReg
Nicolai Hähnle via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 18 13:50:38 PST 2015
nhaehnle 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;
+
----------------
tstellarAMD wrote:
> Is there some reason why you used a variable here and didn't put this condition directly in the if() below?
Yes: the intention was to make it obvious that the condition is constant throughout the loop for both the human and the compiler.
http://reviews.llvm.org/D15622
More information about the llvm-commits
mailing list