Properly fix unused variable in disable-assert builds.
authorDiego Novillo <dnovillo@google.com>
Wed, 11 Nov 2015 16:39:22 +0000 (16:39 +0000)
committerDiego Novillo <dnovillo@google.com>
Wed, 11 Nov 2015 16:39:22 +0000 (16:39 +0000)
I missed the side-effects of ParseBFI in my previous attempt (r252748).
Thanks dblaikie for the suggestion of adding a void use of the unused
variable instead.

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

lib/Target/ARM/ARMISelLowering.cpp

index 166d551..87bd9be 100644 (file)
@@ -9141,7 +9141,9 @@ static SDValue PerformBFICombine(SDNode *N,
     SDValue From1 = ParseBFI(N, ToMask1, FromMask1);
 
     APInt ToMask2, FromMask2;
-    assert(From1 == ParseBFI(CombineBFI.getNode(), ToMask2, FromMask2));
+    SDValue From2 = ParseBFI(CombineBFI.getNode(), ToMask2, FromMask2);
+    assert(From1 == From2);
+    (void)From2;
   
     // First, unlink CombineBFI.
     DCI.DAG.ReplaceAllUsesWith(CombineBFI, CombineBFI.getOperand(0));