Use std::swap
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 7 Apr 2014 16:44:26 +0000 (16:44 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 7 Apr 2014 16:44:26 +0000 (16:44 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205723 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/R600/SIISelLowering.cpp

index 29aaa9e76b6d1312bef1c9cbe0341238463dc3f9..58526d27a996fbe2232a501e74b9801eb5a82ee3 100644 (file)
@@ -1281,9 +1281,7 @@ SDNode *SITargetLowering::foldOperands(MachineSDNode *Node,
            fitsRegClass(DAG, Ops[1], OtherRegClass))) {
 
         // Swap commutable operands
-        SDValue Tmp = Ops[1];
-        Ops[1] = Ops[0];
-        Ops[0] = Tmp;
+        std::swap(Ops[0], Ops[1]);
 
         Desc = DescRev;
         DescRev = 0;