openhwgroup / corev-gcc

GNU General Public License v2.0
22 stars 23 forks source link

[XCVmem] Normal register-immediate store not recognized #74

Closed MaryBennett closed 1 year ago

MaryBennett commented 1 year ago

For example:

(set
  (mem:SI
    (plus:SI
      (reg/f:SI 136 [ _8 ])
      (reg:SI 140 [ivtmp.70 ]))
    [ 1 MEM[(int *)_8 + ivtmp.70_3 * 1]+0 S4 A32])
  (const_int 0 [0]))
MaryBennett commented 1 year ago

This could be a problem with the predicate nonimmediate_nonpostinc in movSI_internal. The predicate prevents (mem:X (plus:X (reg)) operands.

pascalgouedo commented 1 year ago

Hi @MaryBennett We have a fatal error looking like your description:

 281 | }
      | ^
(insn 327 326 328 14 (set (mem:SI (plus:SI (reg/f:SI 220 [ _353 ])
                (reg:SI 217 [ ivtmp.131 ])) [1 MEM[(int *)_353 + ivtmp.131_336 * 1]+0 S4 A32])
        (const_int 0 [0])) "./test.c":151:27 -1
     (nil))
during RTL pass: vregs
./test.c:281:1: internal compiler error: in extract_insn, at recog.cc:2791
0x705909 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*)
    ../../../gcc/gcc/rtl-error.cc:108
0x705928 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
    ../../../gcc/gcc/rtl-error.cc:116
0xe067a7 extract_insn(rtx_insn*)
    ../../../gcc/gcc/recog.cc:2791
0xaeb2f9 instantiate_virtual_regs_in_insn
    ../../../gcc/gcc/function.cc:1611
0xaeb2f9 instantiate_virtual_regs
    ../../../gcc/gcc/function.cc:1985
0xaeb2f9 execute
    ../../../gcc/gcc/function.cc:2034
Please submit a full bug report, with preprocessed source.

Here is the bug report: ccl99VL8.out.gz

MaryBennett commented 1 year ago

Fixed in PR #75