DAGCombiner: chain improvement going past non-aliasing monotonic atomic ops

I am suggesting a change to DAGCombiner::GatherAllAliases Currently, it does not allow the iterative chain improvement to get past an atomic operation, even if this atomic is monotonic AKA relaxed and provably non-aliasing with the mem op currently being improved.

I wrote a (pretty small) commit that allows it to handle this case, but I’d like to:

  1. Understand if there’s a good reason why this wasn’t done already
  2. If no such reason exists, contribute my commit to LLVM

I’m new to this forum and got no idea what’s the right category/tags to use.
How should I proceed with this?

Most optimizations don’t try to handle atomics out of laziness/fear of optimizing them. There’s probably no good reason for not doing it