[llvm] r200775 - R600/SI: Don't assume copies will be coalesced in SIFixSGPRCopies

Tom Stellard thomas.stellard at amd.com
Tue Feb 4 09:18:42 PST 2014


Author: tstellar
Date: Tue Feb  4 11:18:42 2014
New Revision: 200775

URL: http://llvm.org/viewvc/llvm-project?rev=200775&view=rev
Log:
R600/SI: Don't assume copies will be coalesced in SIFixSGPRCopies

There is no lit test for this, because it would be too big and
complicated, but it does fix a crash in the Arithm/Absdiff.* OpenCV test.

Modified:
    llvm/trunk/lib/Target/R600/SIFixSGPRCopies.cpp

Modified: llvm/trunk/lib/Target/R600/SIFixSGPRCopies.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/SIFixSGPRCopies.cpp?rev=200775&r1=200774&r2=200775&view=diff
==============================================================================
--- llvm/trunk/lib/Target/R600/SIFixSGPRCopies.cpp (original)
+++ llvm/trunk/lib/Target/R600/SIFixSGPRCopies.cpp Tue Feb  4 11:18:42 2014
@@ -187,7 +187,7 @@ bool SIFixSGPRCopies::isVGPRToSGPRCopy(c
       DstRC == &AMDGPU::M0RegRegClass)
     return false;
 
-  SrcRC = inferRegClassFromDef(TRI, MRI, SrcReg, SrcSubReg);
+  SrcRC = TRI->getSubRegClass(MRI.getRegClass(SrcReg), SrcSubReg);
   return TRI->isSGPRClass(DstRC) && TRI->hasVGPRs(SrcRC);
 }
 





More information about the llvm-commits mailing list