R600/SI: Remove apparently dead code in legalizeOperands
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 26 Sep 2014 17:54:38 +0000 (17:54 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 26 Sep 2014 17:54:38 +0000 (17:54 +0000)
No tests hit this, and I don't see any way a GlobalAddress
node would survive beyond lowering on SI. It it would, the
move should probably be inserted by selection.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218526 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/R600/SIISelLowering.cpp

index 10b42750c131a9c1e926c36b76e178b97c6da931..8a3ab46ad22eff34933f7d191c5390e6442f049a 100644 (file)
@@ -1790,14 +1790,6 @@ SDNode *SITargetLowering::legalizeOperands(MachineSDNode *Node,
         ensureSRegLimit(DAG, Ops[i], RegClass, ScalarSlotUsed);
       }
       continue;
-    } else {
-      // If it's not a VSrc or SSrc operand check if we have a GlobalAddress.
-      // These will be lowered to immediates, so we will need to insert a MOV.
-      if (isa<GlobalAddressSDNode>(Ops[i])) {
-        SDNode *Node = DAG.getMachineNode(AMDGPU::V_MOV_B32_e32, SDLoc(),
-                                    Operand.getValueType(), Operand);
-        Ops[i] = SDValue(Node, 0);
-      }
     }
 
     if (i == 1 && DescRev && fitsRegClass(DAG, Ops[0], RegClass)) {