Created attachment 22490
Code that exhibits the issue
https://godbolt.org/z/37Leg_
Clang trunk (371698) is able to reduce "munge" to the same code as "munge2".
(BTW all versions of gcc, icc, and older clang versions could not.)
However, "munge1" and "munge3" get a slightly longer version that loads and
stores to/from a register instead of using immediates. As best I can tell
these are all represent equivalent functions and should have the same ASM
representation for a given optimization level.
Compiler Explorer C++ Editor #1 Code (1).cpp
(708 bytes, application/octet-stream)