[llvm] [RISCV] Remove unnecessary asserts that std::optional has a value. NFC (PR #109734)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 23 18:56:24 PDT 2024


================
@@ -10261,7 +10261,6 @@ SDValue RISCVTargetLowering::lowerINSERT_SUBVECTOR(SDValue Op,
   // and decomposeSubvectorInsertExtractToSubRegs takes this into account. So if
   // we have a fixed length subvector, we need to adjust the index by 1/vscale.
   if (SubVecVT.isFixedLengthVector()) {
-    assert(VLen);
     unsigned Vscale = *VLen / RISCV::RVVBitsPerBlock;
----------------
lukel97 wrote:

Is * on an empty optional not UB?

https://github.com/llvm/llvm-project/pull/109734


More information about the llvm-commits mailing list