I believe this is because of an extra compiler flag godbolt includes by default (see https://stackoverflow.com/a/45562380 and https://github.com/rust-lang/rust/issues/11906), which you can turn off by explicitly adding “-C debuginfo=0”. When I do that, these superfluous instructions go away and the Rust and C outputs are identical.
Awesome thanks! I thought how it can be possible that both clang and rust use libllvm and have different code… So I was wrong, Thanks!
Though, I don’t understand why the godbolt adds any flags which are not visible.