splicer3 wrote: @FedericoBruzzone I rebased the PR and updated it based on the comments. The changes in `BufferOptimizations.cpp` were indeed simplified thanks to the other PR. https://github.com/llvm/llvm-project/pull/226951