[llvm] ea2d4c5 - [GlobalISel] Fix -Wunused-function in -DLLVM_ENABLE_ASSERTIONS=off builds after D114198
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 24 00:55:59 PST 2021
Author: Fangrui Song
Date: 2021-12-24T00:55:54-08:00
New Revision: ea2d4c5881373cdc12cb4a9f9b0afa3db86d05c6
URL: https://github.com/llvm/llvm-project/commit/ea2d4c5881373cdc12cb4a9f9b0afa3db86d05c6
DIFF: https://github.com/llvm/llvm-project/commit/ea2d4c5881373cdc12cb4a9f9b0afa3db86d05c6.diff
LOG: [GlobalISel] Fix -Wunused-function in -DLLVM_ENABLE_ASSERTIONS=off builds after D114198
Added:
Modified:
llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp b/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
index 6b50fa49c063f..262dc16f44aba 100644
--- a/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
@@ -3630,6 +3630,7 @@ Register LegalizerHelper::getVectorElementPointer(Register VecPtr, LLT VecTy,
return MIRBuilder.buildPtrAdd(PtrTy, VecPtr, Mul).getReg(0);
}
+#ifndef NDEBUG
/// Check that all vector operands have same number of elements. Other operands
/// should be listed in NonVecOp.
static bool hasSameNumEltsOnAllVectorOperands(
@@ -3665,6 +3666,7 @@ static bool hasSameNumEltsOnAllVectorOperands(
return true;
}
+#endif
/// Fill \p DstOps with DstOps that have same number of elements combined as
/// the Ty. These DstOps have either scalar type when \p NumElts = 1 or are
More information about the llvm-commits
mailing list