Skip to content

Commit c03b6e8

Browse files
authored
[SPIRV] Mark maybe unused extractSubvector variable (#116117)
Change #115178 introduced a variable that is only used in an assert, which could result in an unused variable warning in builds without asserts enabled. This just addes the maybe_unused attribute to silence the warning.
1 parent b4d23cf commit c03b6e8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2941,7 +2941,8 @@ void SPIRVInstructionSelector::extractSubvector(
29412941
Register &ResVReg, const SPIRVType *ResType, Register &ReadReg,
29422942
MachineInstr &InsertionPoint) const {
29432943
SPIRVType *InputType = GR.getResultType(ReadReg);
2944-
uint64_t InputSize = GR.getScalarOrVectorComponentCount(InputType);
2944+
[[maybe_unused]] uint64_t InputSize =
2945+
GR.getScalarOrVectorComponentCount(InputType);
29452946
uint64_t ResultSize = GR.getScalarOrVectorComponentCount(ResType);
29462947
assert(InputSize > 1 && "The input must be a vector.");
29472948
assert(ResultSize > 1 && "The result must be a vector.");

0 commit comments

Comments
 (0)