diff options
author | Pan Li <pan2.li@intel.com> | 2023-08-13 08:56:21 +0800 |
---|---|---|
committer | Pan Li <pan2.li@intel.com> | 2023-08-15 10:27:59 +0800 |
commit | d5ef0ee307058c5efade84e45228a7576c0141c7 (patch) | |
tree | 1c161faed05905786a66a90e6805f83f8b9d4a85 /gcc/tree-vectorizer.h | |
parent | 469711f06865979854e587263d3d43137f256b57 (diff) | |
download | gcc-d5ef0ee307058c5efade84e45228a7576c0141c7.zip gcc-d5ef0ee307058c5efade84e45228a7576c0141c7.tar.gz gcc-d5ef0ee307058c5efade84e45228a7576c0141c7.tar.bz2 |
Mode-Switching: Fix SET_SRC ICE for create_pre_exit
In same cases, like gcc/testsuite/gcc.dg/pr78148.c in RISC-V, there will
be only 1 operand when SET_SRC in create_pre_exit. For example as below.
(insn 13 9 14 2 (clobber (reg/i:TI 10 a0)) "gcc/testsuite/gcc.dg/pr78148.c":24:1 -1
(expr_list:REG_UNUSED (reg/i:TI 10 a0)
(nil)))
Unfortunately, SET_SRC requires at least 2 operands and then Segment
Fault here. For SH4 part result in Segment Fault, it looks like only
valid when the return_copy_pat is load or something like that. Thus,
this patch try to fix it by restrict the SET insn for SET_SRC.
Signed-off-by: Pan Li <pan2.li@intel.com>
gcc/ChangeLog:
* mode-switching.cc (create_pre_exit): Add SET insn check.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/mode-switch-ice-1.c: New test.
Diffstat (limited to 'gcc/tree-vectorizer.h')
0 files changed, 0 insertions, 0 deletions