[llvm] Local: Handle noalias_addrspace in combineMetadata (PR #103938)
Fraser Cormack via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 9 22:33:08 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());
----------------
frasercrmck wrote:
I notice we're moving a bunch of asserts around. I think that needs explaining in the commit message. However, it feels like something's wrong.
Does `insert` perhaps need to be updated so that it inserts 32-bit values depending on the range type? Would that fix us having mixed 64- and 32-bit range values? Is that even possible right now - what if we want to insert into an empty range? We can't know what bitwidth to use.
https://github.com/llvm/llvm-project/pull/103938
More information about the llvm-commits
mailing list