[IRBuilder] Fix -Wunused-variable in non-assertion build. NFC
authorFangrui Song <i@maskray.me>
Thu, 15 Sep 2022 05:14:36 +0000 (22:14 -0700)
committerFangrui Song <i@maskray.me>
Thu, 15 Sep 2022 05:14:36 +0000 (22:14 -0700)
llvm/lib/IR/IRBuilder.cpp

index 8a46a71..438d04f 100644 (file)
@@ -716,6 +716,7 @@ CallInst *IRBuilderBase::CreateMaskedExpandLoad(Type *Ty, Value *Ptr,
   assert(PtrTy->isOpaqueOrPointeeTypeMatches(
              cast<FixedVectorType>(Ty)->getElementType()) &&
          "Wrong element type");
+  (void)PtrTy;
   assert(Mask && "Mask should not be all-ones (null)");
   if (!PassThru)
     PassThru = UndefValue::get(Ty);
@@ -738,6 +739,7 @@ CallInst *IRBuilderBase::CreateMaskedCompressStore(Value *Val, Value *Ptr,
   assert(PtrTy->isOpaqueOrPointeeTypeMatches(
              cast<FixedVectorType>(DataTy)->getElementType()) &&
          "Wrong element type");
+  (void)PtrTy;
   assert(Mask && "Mask should not be all-ones (null)");
   Type *OverloadedTypes[] = {DataTy};
   Value *Ops[] = {Val, Ptr, Mask};