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.
  • [Bug target/105480] New... sebastian-gcc at sipsolutions dot net via Gcc-bugs

Reply via email to