Chaining uadd.with.overflow
should optimize to or disjoint
#118162
Labels
llvm:instcombine
missed-optimization
wontfix
Issue is real, but we can't or won't fix it. Not invalid
The following code is useful for doing bigint addition, where you need to add the the digits from both numbers but also add a carry https://cpp.godbolt.org/z/c7PcWqbz7
That
c1 | c2
stays anor i1
, but it would be legal for it to beor disjoint i1
: https://alive2.llvm.org/ce/z/BMwvqN(This is a C++ translation of Rust's https://doc.rust-lang.org/std/primitive.u32.html#method.carrying_add, cc rust-lang/rust#85532)
The text was updated successfully, but these errors were encountered: