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

            Bug ID: 114402
           Summary: rs6000: ICE when long double is ieee128 format by
                    default but without vsx
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: linkw at gcc dot gnu.org
  Target Milestone: ---

When I was doing a patch to make us only have two 128bit fp on rs6000, I found
that we can have long double with ieee128 format by default and even not having
vsx support, but a simple test case with comparison triggers ICE as below:

long double a;
long double b;

int foo() {
  if (a > b)
    return 0;
  else
    return 1;
}

/opt/gcc-nightly/trunk/bin/gcc test.c -mno-vsx

test.c: In function ‘foo’:
test.c:9:1: error: unrecognizable insn:
    9 | }
      | ^
(insn 9 8 10 2 (set (reg:CCFP 123)
        (compare:CCFP (reg:TF 117 [ a.0_1 ])
            (reg:TF 118 [ b.1_2 ]))) "test.c":5:6 -1
     (nil))
during RTL pass: vregs
test.c:9:1: internal compiler error: in extract_insn, at recog.cc:2812
0x102b7353 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
        /home/gccbuild/gcc_trunk_git/gcc/gcc/rtl-error.cc:108
0x102b73a7 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
        /home/gccbuild/gcc_trunk_git/gcc/gcc/rtl-error.cc:116
0x10c6636b extract_insn(rtx_insn*)
        /home/gccbuild/gcc_trunk_git/gcc/gcc/recog.cc:2812
0x107ef797 instantiate_virtual_regs_in_insn
        /home/gccbuild/gcc_trunk_git/gcc/gcc/function.cc:1611
0x107ef797 instantiate_virtual_regs
        /home/gccbuild/gcc_trunk_git/gcc/gcc/function.cc:1994
0x107ef797 execute
        /home/gccbuild/gcc_trunk_git/gcc/gcc/function.cc:2041
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

Note that it should be configured with --with-long-double-format=ieee, since if
-mabi=ieeelongdouble is specified, it will requires vsx to be enabled.

Reply via email to