[X86] Fix -Wunused-function in -DLLVM_ENABLE_ASSERTIONS=off builds
authorFangrui Song <i@maskray.me>
Fri, 19 Mar 2021 06:22:58 +0000 (23:22 -0700)
committerFangrui Song <i@maskray.me>
Fri, 19 Mar 2021 06:22:58 +0000 (23:22 -0700)
llvm/lib/Target/X86/X86LowerAMXIntrinsics.cpp

index 134df5d..e267ba4 100644 (file)
@@ -43,12 +43,14 @@ using namespace PatternMatch;
 
 #define DEBUG_TYPE "lower-amx-intrinsics"
 
+#ifndef NDEBUG
 static bool isV256I32Ty(Type *Ty) {
   if (auto *FVT = dyn_cast<FixedVectorType>(Ty))
     return FVT->getNumElements() == 256 &&
            FVT->getElementType()->isIntegerTy(32);
   return false;
 }
+#endif
 
 namespace {
 class X86LowerAMXIntrinsics {