[llvm] da4822f - [PowerPC][NFC] Ignore unused var in release builds.

Jordan Rupprecht via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 11 08:59:07 PST 2021


Author: Jordan Rupprecht
Date: 2021-11-11T08:57:40-08:00
New Revision: da4822f6c81597d9d6bf68c11d7fd98d37c1b1ea

URL: https://github.com/llvm/llvm-project/commit/da4822f6c81597d9d6bf68c11d7fd98d37c1b1ea
DIFF: https://github.com/llvm/llvm-project/commit/da4822f6c81597d9d6bf68c11d7fd98d37c1b1ea.diff

LOG: [PowerPC][NFC] Ignore unused var in release builds.

Note we can't inline this call into assert because `isIntS16Immediate` has a side effect. But we only look at the return value in asserts builds.

Added: 
    

Modified: 
    llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp b/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
index 745b3da76f16..ef9cb454dd87 100644
--- a/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
+++ b/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
@@ -5021,6 +5021,7 @@ void PPCDAGToDAGISel::Select(SDNode *N) {
         // The 2nd and 3rd operands are imm + reg.
         bool isOperand4IntS16Immediate =
             isIntS16Immediate(N->getOperand(4), SImmOperand4);
+        (void)isOperand4IntS16Immediate;
         assert(isOperand4IntS16Immediate &&
                "The 4th operand is not an Immediate");
         // We need to flip the condition immediate TO.


        


More information about the llvm-commits mailing list