[llvm] 4889add - [X86] Replace (void) with [[maybe_unused]] for some variables unused (or only used in asserts). NFC.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 19 01:52:09 PDT 2024
Author: Simon Pilgrim
Date: 2024-06-19T09:51:47+01:00
New Revision: 4889add1870545daf18ea01858fd1a46bd0d7198
URL: https://github.com/llvm/llvm-project/commit/4889add1870545daf18ea01858fd1a46bd0d7198
DIFF: https://github.com/llvm/llvm-project/commit/4889add1870545daf18ea01858fd1a46bd0d7198.diff
LOG: [X86] Replace (void) with [[maybe_unused]] for some variables unused (or only used in asserts). NFC.
Added:
Modified:
llvm/lib/Target/X86/X86ISelLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index f27c935812f51..a54fa257fee94 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -4183,8 +4183,7 @@ static SDValue splitVectorIntUnary(SDValue Op, SelectionDAG &DAG,
const SDLoc &dl) {
// Make sure we only try to split 256/512-bit types to avoid creating
// narrow vectors.
- EVT VT = Op.getValueType();
- (void)VT;
+ [[maybe_unused]] EVT VT = Op.getValueType();
assert((Op.getOperand(0).getValueType().is256BitVector() ||
Op.getOperand(0).getValueType().is512BitVector()) &&
(VT.is256BitVector() || VT.is512BitVector()) && "Unsupported VT!");
@@ -4199,8 +4198,7 @@ static SDValue splitVectorIntUnary(SDValue Op, SelectionDAG &DAG,
static SDValue splitVectorIntBinary(SDValue Op, SelectionDAG &DAG,
const SDLoc &dl) {
// Assert that all the types match.
- EVT VT = Op.getValueType();
- (void)VT;
+ [[maybe_unused]] EVT VT = Op.getValueType();
assert(Op.getOperand(0).getValueType() == VT &&
Op.getOperand(1).getValueType() == VT && "Unexpected VTs!");
assert((VT.is256BitVector() || VT.is512BitVector()) && "Unsupported VT!");
@@ -23411,8 +23409,7 @@ static SDValue LowerVSETCC(SDValue Op, const X86Subtarget &Subtarget,
assert(!IsStrict && "Strict SETCC only handles FP operands.");
- MVT VTOp0 = Op0.getSimpleValueType();
- (void)VTOp0;
+ [[maybe_unused]] MVT VTOp0 = Op0.getSimpleValueType();
assert(VTOp0 == Op1.getSimpleValueType() &&
"Expected operands with same type!");
assert(VT.getVectorNumElements() == VTOp0.getVectorNumElements() &&
More information about the llvm-commits
mailing list