[llvm] Fix unused variable build failure in Release build (PR #208195)

Chirag Patel via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 8 04:03:22 PDT 2026


https://github.com/ChiragPatel8 created https://github.com/llvm/llvm-project/pull/208195

Fixes build failure introduced by commit [736771b] (https://github.com/llvm/llvm-project/commit/736771b6a017b5a18c03819a3348ff793c473261) into llvm:main 

Ref : https://github.com/llvm/llvm-project/pull/207148
Failure : https://lab.llvm.org/buildbot/#/builders/228/builds/4056

>From 805a922a5f6d2546e62792a757cda1a4e6d76c98 Mon Sep 17 00:00:00 2001
From: chirag <chirag198838 at gmail.com>
Date: Wed, 8 Jul 2026 16:31:10 +0530
Subject: [PATCH] Fix unused variable build failure in Release build

---
 llvm/lib/Target/Hexagon/HexagonISelLowering.cpp | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/llvm/lib/Target/Hexagon/HexagonISelLowering.cpp b/llvm/lib/Target/Hexagon/HexagonISelLowering.cpp
index 372eff4857fbd..72c9cbd5a84ae 100644
--- a/llvm/lib/Target/Hexagon/HexagonISelLowering.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonISelLowering.cpp
@@ -1066,8 +1066,7 @@ SDValue HexagonTargetLowering::LowerSETCC(SDValue Op, SelectionDAG &DAG) const {
   MVT OpTy = ty(LHS);
 
   if (OpTy == MVT::v2i16 || OpTy == MVT::v4i8) {
-    MVT ElemTy = OpTy.getVectorElementType();
-    assert(ElemTy.isScalarInteger());
+    assert(OpTy.getVectorElementType().isScalarInteger());
     MVT WideTy = OpTy.widenIntegerElementType();
     return DAG.getSetCC(dl, ResTy,
                         DAG.getSExtOrTrunc(LHS, SDLoc(LHS), WideTy),
@@ -1123,8 +1122,7 @@ HexagonTargetLowering::LowerVSELECT(SDValue Op, SelectionDAG &DAG) const {
   const SDLoc &dl(Op);
 
   if (OpTy == MVT::v2i16 || OpTy == MVT::v4i8) {
-    MVT ElemTy = OpTy.getVectorElementType();
-    assert(ElemTy.isScalarInteger());
+    assert(OpTy.getVectorElementType().isScalarInteger());
     MVT WideTy = OpTy.widenIntegerElementType();
     // Generate (trunc (select (_, sext, sext))).
     return DAG.getSExtOrTrunc(



More information about the llvm-commits mailing list