Bug 90103 - ICE building Glibc's e_atan2f.c with -O2 -mcpu=hs38_linux -frounding-math
Summary: ICE building Glibc's e_atan2f.c with -O2 -mcpu=hs38_linux -frounding-math
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 8.3.0
: P3 normal
Target Milestone: 9.0
Assignee: Not yet assigned to anyone
Keywords: ice-on-valid-code
Depends on:
Reported: 2019-04-15 15:45 UTC by Alexey Brodkin
Modified: 2021-08-15 04:03 UTC (History)
0 users

See Also:
Target: arc
Known to work:
Known to fail:
Last reconfirmed:

Preprocesssed input file (7.75 KB, text/plain)
2019-04-15 15:45 UTC, Alexey Brodkin

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Brodkin 2019-04-15 15:45:41 UTC
Created attachment 46172 [details]
Preprocesssed input file

# arc-unknown-linux-gnu-gcc -mcpu=hs38_linux e_atan2f.i -c -O2 -frounding-math

../sysdeps/ieee754/flt-32/e_atan2f.c: In function '__ieee754_atan2f':
../sysdeps/ieee754/flt-32/e_atan2f.c:93:1: error: unrecognizable insn:
(insn 112 111 113 25 (set (reg/v:SF 172 [ <retval> ])
        (fma:SF (const_double:SF 3.0e+0 [0x0.cp+2])
            (const_double:SF 7.85398185253143310546875e-1 [0x0.c90fdbp+0])
            (reg:SF 58 r58))) "../sysdeps/ieee754/flt-32/e_atan2f.c":61 -1
during RTL pass: vregs
../sysdeps/ieee754/flt-32/e_atan2f.c:93:1: internal compiler error: in extract_insn, at recog.c:2304
0x55ed94 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*)
0x55edb0 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
0x9aa5c7 extract_insn(rtx_insn*)
0x7c258d instantiate_virtual_regs_in_insn
0x7c258d instantiate_virtual_regs
0x7c258d execute
Comment 1 Claudiu Zissulescu 2019-04-16 09:46:29 UTC
Probably,this patch needs to be backported:

    [ARC] Update fma expansions.
    Accept at most a single constant for fma patterns.
    2018-03-21  Claudiu Zissulescu  <claziss@synopsys.com>
            * config/arc/fpu.md (fmasf4): Force operand to register.
            (fnmasf4): Likewise.
    2018-03-21  Claudiu Zissulescu  <claziss@synopsys.com>
            * gcc.target/arc/fma-1.c: New test.
SVN: 261543
Comment 2 Alexey Brodkin 2019-04-16 11:11:26 UTC
Indeed, proposed back-port fixes that problem!
May we get it back-ported to 8.3.0 branch?
Comment 3 Andrew Pinski 2021-08-15 04:03:13 UTC
Fixed in GCC 9, 8.x is no longer supported.