This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libgcc/71559] ICE in ix86_fp_cmp_code_to_pcmp_immediate, at config/i386/i386.c:23042 (KNL/AVX512)
- From: "joseph at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 17 Jun 2016 19:50:29 +0000
- Subject: [Bug libgcc/71559] ICE in ix86_fp_cmp_code_to_pcmp_immediate, at config/i386/i386.c:23042 (KNL/AVX512)
- Auto-submitted: auto-generated
- References: <bug-71559-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71559
--- Comment #11 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
On Fri, 17 Jun 2016, jakub at gcc dot gnu.org wrote:
> The patch is completely untested though (and wonder if we have testcases for
> not raising exceptions when isgreater etc. arguments are qNaNs.
We probably don't have such tests - tests for exception raising or its
absence are fairly limited. Those functions are covered in the glibc
testsuite, but of course that only covers whichever insn patterns get used
for __builtin_is* for that particular build of the glibc tests.
There are definitely bugs on some architectures involving ordinary ordered
comparisons such as < and >= wrongly using quiet instructions. See bug
52451 for i386 (x87 floating point) and bug 58684 for powerpc, for
example. A consequence of this is that if you add tests of comparisons
doing the right thing, some of those tests would immediately fail on some
architectures.
(These sorts of local bugs with particular operations or optimizations
being incorrect regarding exceptions are certainly easier to fix than the
issues with optimizations not being aware of exceptions and rounding modes
as extra inputs / outputs to floating-point operations. The ones with
individual operations could I expect largely be found through thorough
test coverage; those with optimizations might be harder to find.)
Note that there is some ambiguity about whether LTGT RTL (and
corresponding GENERIC / GIMPLE) should be a quiet operation corresponding
to islessgreater, or ((x < y) || (x > y)) raising exceptions for quiet
NaNs. See the discussion at
<https://gcc.gnu.org/ml/gcc-patches/2015-02/threads.html#00555>. Fixing
the ambiguity in either direction would probably involve changes to the
part of the compiler expecting the other semantics.