[llvm] SPIRVInstructionSelector::selectExtractVal - add missing brackets to assertion condition to fix gcc -Wparentheses warning (PR #179656)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 4 05:33:07 PST 2026
https://github.com/RKSimon created https://github.com/llvm/llvm-project/pull/179656
None
>From c00f6f92e4e1894527003e2bcaf0b7cba82c35ae Mon Sep 17 00:00:00 2001
From: Simon Pilgrim <llvm-dev at redking.me.uk>
Date: Wed, 4 Feb 2026 13:32:09 +0000
Subject: [PATCH] SPIRVInstructionSelector::selectExtractVal - add missing
brackets to assertion condition to fix gcc -Wparentheses warning
---
llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp b/llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp
index 2f1506780e4b7..2c3d7e9c0db44 100644
--- a/llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp
@@ -3524,9 +3524,8 @@ bool SPIRVInstructionSelector::selectExtractVal(Register ResVReg,
StringRef ResName;
if (GR.findValueAttrs(&I, MaybeResTy, ResName) &&
MaybeResTy != GR.getTypeForSPIRVType(ResType)) {
- assert(!MaybeResTy ||
- MaybeResTy->isAggregateType() &&
- "Expected aggregate type for extractv instruction");
+ assert((!MaybeResTy || MaybeResTy->isAggregateType()) &&
+ "Expected aggregate type for extractv instruction");
ResType = GR.getOrCreateSPIRVType(MaybeResTy, I,
SPIRV::AccessQualifier::ReadWrite, false);
GR.assignSPIRVTypeToVReg(ResType, ResVReg, *I.getMF());
More information about the llvm-commits
mailing list