https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80530

            Bug ID: 80530
           Summary: [7 Regression][AArch64] ICE when expanding reciprocal
                    square root with -mcpu=exynos-m1 or -mcpu=xgene-1
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jgreenhalgh at gcc dot gnu.org
  Target Milestone: ---

This testcase:

double
bar (double a)
{
  return 1.0/__builtin_sqrt(a);
}

Fails with an ICE on AArch64 with the options:

 gcc -funsafe-math-optimizations -O1 foo.c -mcpu=xgene1

on Linux.

g.c: In function ‘bar’:
g.c:11:14: internal compiler error: in expand_insn, at optabs.c:7130
   return 1.0/__builtin_sqrt(a);
              ^~~~~~~~~~~~~~~~~
0xa70a15 expand_insn(insn_code, unsigned int, expand_operand*)
        .../gcc/optabs.c:7130
0x94589e expand_direct_optab_fn
        .../gcc/internal-fn.c:2600
0x71d4b7 expand_call_stmt
        .../gcc/cfgexpand.c:2569
0x71d4b7 expand_gimple_stmt_1
        .../gcc/cfgexpand.c:3571
0x71d4b7 expand_gimple_stmt
        .../gcc/cfgexpand.c:3737
0x71ee69 expand_gimple_basic_block
        .../gcc/cfgexpand.c:5744
0x7247d6 execute
        .../gcc/cfgexpand.c:6357
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

The problem will be somewhere in the approximate square root expander, as the
same ICE does not occur for -mcpu values which do not use the approximate
square root expansion path.

Reply via email to