[llvm] Local: Handle noalias_addrspace in combineMetadata (PR #103938)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 10 03:36:36 PDT 2024


================
@@ -39,12 +39,14 @@ void ConstantRangeList::insert(const ConstantRange &NewRange) {
     return;
   assert(!NewRange.isFullSet() && "Do not support full set");
   assert(NewRange.getLower().slt(NewRange.getUpper()));
-  assert(getBitWidth() == NewRange.getBitWidth());
   // Handle common cases.
   if (empty() || Ranges.back().getUpper().slt(NewRange.getLower())) {
     Ranges.push_back(NewRange);
     return;
   }
+
+  assert(getBitWidth() == NewRange.getBitWidth());
----------------
arsenm wrote:

An empty range has no bitwidth. I don't think it's worth adding an explicit field for bit width to give a bit width to the empty range 

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


More information about the llvm-commits mailing list