[cfe-users] SIMD FPE

Bram Stolk via cfe-users cfe-users at lists.llvm.org
Sun Dec 30 16:57:39 PST 2018

I got an issue with a Floating Point Exception.
In my code, there are two floating point divisions.
And clang-6 decides to use an SSE division (divps  %xmm0,%xmm1) to compute them.

Fine so far.

But the two unused lanes contain zeros, triggering the FPE.

Isn't it the compiler's responsibility to make sure all lanes in the
SIMD vector have sane values, even if not all lanes are used?

If not, enabling Floating Point Exceptions would make no sense for any
clang generated code.

All the details are listed here:


Owner/Director of Game Studio Abraham Stolk Inc.
Vancouver BC, Canada
b.stolk at gmail.com

More information about the cfe-users mailing list