Add a comment
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Thu, 14 Nov 2013 08:06:38 +0000 (08:06 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Thu, 14 Nov 2013 08:06:38 +0000 (08:06 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194684 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/R600/SIInstrInfo.cpp

index e293c3a22ae823ba737cf716a6254e96af6d71a0..8eb707d7380f636a03fc920c61a6aad1d0393bdd 100644 (file)
@@ -440,7 +440,9 @@ void SIInstrInfo::legalizeOperands(MachineInstr *MI) const {
   // Legalize VOP2
   if (isVOP2(MI->getOpcode()) && Src1Idx != -1) {
     MachineOperand &Src1 = MI->getOperand(Src1Idx);
-    // Legalize VOP2 instructions where src1 is not a VGPR.
+
+    // Legalize VOP2 instructions where src1 is not a VGPR. An SGPR input must
+    // be the first operand, and there can only be one.
     if (Src1.isImm() || Src1.isFPImm() ||
         (Src1.isReg() && RI.isSGPRClass(MRI.getRegClass(Src1.getReg())))) {
       if (MI->isCommutable()) {