You don't have to guess, you could turn or O3 or look at the disassembly.
https://godbolt.org/z/qxsKWfz9s
https://godbolt.org/z/qxsKWfz9s