Skip to content

Commit 4889add

Browse files
committed
[X86] Replace (void) with [[maybe_unused]] for some variables unused (or only used in asserts). NFC.
1 parent f7336b9 commit 4889add

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4183,8 +4183,7 @@ static SDValue splitVectorIntUnary(SDValue Op, SelectionDAG &DAG,
41834183
const SDLoc &dl) {
41844184
// Make sure we only try to split 256/512-bit types to avoid creating
41854185
// narrow vectors.
4186-
EVT VT = Op.getValueType();
4187-
(void)VT;
4186+
[[maybe_unused]] EVT VT = Op.getValueType();
41884187
assert((Op.getOperand(0).getValueType().is256BitVector() ||
41894188
Op.getOperand(0).getValueType().is512BitVector()) &&
41904189
(VT.is256BitVector() || VT.is512BitVector()) && "Unsupported VT!");
@@ -4199,8 +4198,7 @@ static SDValue splitVectorIntUnary(SDValue Op, SelectionDAG &DAG,
41994198
static SDValue splitVectorIntBinary(SDValue Op, SelectionDAG &DAG,
42004199
const SDLoc &dl) {
42014200
// Assert that all the types match.
4202-
EVT VT = Op.getValueType();
4203-
(void)VT;
4201+
[[maybe_unused]] EVT VT = Op.getValueType();
42044202
assert(Op.getOperand(0).getValueType() == VT &&
42054203
Op.getOperand(1).getValueType() == VT && "Unexpected VTs!");
42064204
assert((VT.is256BitVector() || VT.is512BitVector()) && "Unsupported VT!");
@@ -23411,8 +23409,7 @@ static SDValue LowerVSETCC(SDValue Op, const X86Subtarget &Subtarget,
2341123409

2341223410
assert(!IsStrict && "Strict SETCC only handles FP operands.");
2341323411

23414-
MVT VTOp0 = Op0.getSimpleValueType();
23415-
(void)VTOp0;
23412+
[[maybe_unused]] MVT VTOp0 = Op0.getSimpleValueType();
2341623413
assert(VTOp0 == Op1.getSimpleValueType() &&
2341723414
"Expected operands with same type!");
2341823415
assert(VT.getVectorNumElements() == VTOp0.getVectorNumElements() &&

0 commit comments

Comments
 (0)