https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96780
--- Comment #7 from Vittorio Romeo <vittorio.romeo at outlook dot com> --- > As discussed on IRC, we might not want to do this folding at -O0 (although > I'd personally be happy with it unconditionally). I think you should reconsider this as discussed in these places: - https://github.com/llvm/llvm-project/issues/53689 - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104719 Compiling in `-O0` is a valid choice when trying to maximize compilation speed and debuggability, yet pretty much everyone seems to agree that they'd like to never see `std::move`/`std::forward` in their debugger nor have them introduce any performance overhead, even in `-O0`. I would also suggest, as an extension, to consider a more general approach for other standard library functions. As an example, there are good gains to be made in terms of debug performance for things like `std::unique_ptr` (see https://github.com/llvm/llvm-project/issues/53689#issuecomment-1055669228) or `std::vector<T>::iterator`.