Comment by threeducks

4 hours ago

Yes. For example consider this function to add two 2D points, which accepts and returns all variables entirely in xmm registers: https://gcc.godbolt.org/z/hPGKrh6W4 (surprisingly, gcc generates some fairly odd assembly code here)

It's fixed if you pass -fno-trapping-math. There could be junk in the upper half of the registers that causes a floating-point exception.

  • Oh, that explains the seemingly useless movs. Thank you! I simply thought that it was a bug, since clang did not emit them.