[Bug target/105480] New: Vectorized `isnan` appears to trigger FPE on ppc64le
sebastian-gcc at sipsolutions dot net
gcc-bugzilla@gcc.gnu.org
Wed May 4 13:15:34 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105480
Bug ID: 105480
Summary: Vectorized `isnan` appears to trigger FPE on ppc64le
Product: gcc
Version: 11.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: sebastian-gcc at sipsolutions dot net
Target Milestone: ---
Compiling for ppc64le with `-O3` seems to use the `xvcmpgedp` instruction which
ends up setting the FPE flags. I have created an example in godbolt:
https://godbolt.org/z/n8PfPPP1d
Clang will produce similar code (using the same instruction), but when enabling
`-ftrapping-math` (as they always want...) will switch to `vcmpgtud`.
I think the same issue happens with `==` and `!=` which (IIRC) should not trap.
More information about the Gcc-bugs
mailing list