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

            Bug ID: 102274
           Summary: aarch64: ICE (unrecognizable insn) with
                    __builtin_aarch64_fmlal_highv2sf
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: acoplan at gcc dot gnu.org
  Target Milestone: ---

The following fails:

$ cat t.c
typedef __Float16x4_t float16x4_t;
typedef __Float32x2_t float32x2_t;
float32x2_t a;
float16x4_t b;
float16x4_t c;
void f(void) {
  __builtin_aarch64_fmlal_highv2sf(a,b,c);
}
$ gcc/xgcc -B gcc -c t.c
t.c: In function ‘f’:
t.c:8:1: error: unrecognizable insn:
    8 | }
      | ^
(insn 14 13 0 2 (set (reg:V2SF 101)
        (fma:V2SF (float_extend:V2SF (vec_select:V2HF (reg:V4HF 93 [ b.1_2 ])
                    (parallel:V4HF [
                            (const_int 2 [0x2])
                            (const_int 3 [0x3])
                        ])))
            (float_extend:V2SF (vec_select:V2HF (reg:V4HF 94 [ c.2_3 ])
                    (parallel:V4HF [
                            (const_int 2 [0x2])
                            (const_int 3 [0x3])
                        ])))
            (reg:V2SF 92 [ a.0_1 ]))) "t.c":7:3 -1
     (nil))
during RTL pass: vregs
t.c:8:1: internal compiler error: in extract_insn, at recog.c:2769
0x68e4b3 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
        /home/alecop01/toolchain/src/gcc/gcc/rtl-error.c:108
0x68e4df _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
        /home/alecop01/toolchain/src/gcc/gcc/rtl-error.c:116
0xd8245b extract_insn(rtx_insn*)
        /home/alecop01/toolchain/src/gcc/gcc/recog.c:2769
0xa884ef instantiate_virtual_regs_in_insn
        /home/alecop01/toolchain/src/gcc/gcc/function.c:1611
0xa884ef instantiate_virtual_regs
        /home/alecop01/toolchain/src/gcc/gcc/function.c:1985
0xa884ef execute
        /home/alecop01/toolchain/src/gcc/gcc/function.c:2034
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.

I suppose this is really ice-on-invalid since the issue doesn't occur if either
the user supplies the required -march=armv8.2-a+fp16fml or uses the arm_neon.h
interface. In the latter case the user should see "inlining failed" if they
fail to supply the required -march.

Reply via email to