diff options
author | Jiahao Xu <xujiahao@loongson.cn> | 2023-11-29 11:18:00 +0800 |
---|---|---|
committer | Lulu Cheng <chenglulu@loongson.cn> | 2023-12-08 16:44:07 +0800 |
commit | 75f9c2ea29989b1663e4fc2648096ab2836d3877 (patch) | |
tree | 2ff190f52d3e751c388cfa444e277e0257e03742 /gcc/tree.cc | |
parent | 40366b89e9c8e727af70ecf7007cba6c51e4b7d2 (diff) | |
download | gcc-75f9c2ea29989b1663e4fc2648096ab2836d3877.zip gcc-75f9c2ea29989b1663e4fc2648096ab2836d3877.tar.gz gcc-75f9c2ea29989b1663e4fc2648096ab2836d3877.tar.bz2 |
LoongArch: Fix ICE and use simplify_gen_subreg instead of gen_rtx_SUBREG directly.
loongarch_expand_vec_cond_mask_expr generates 'subreg's of 'subreg's, which are not supported
in gcc, it causes an ICE:
ice.c:55:1: error: unrecognizable insn:
55 | }
| ^
(insn 63 62 64 8 (set (reg:V4DI 278)
(subreg:V4DI (subreg:V4DF (reg:V4DI 273 [ vect__53.26 ]) 0) 0)) -1
(nil))
during RTL pass: vregs
ice.c:55:1: internal compiler error: in extract_insn, at recog.cc:2804
Last time, Ruoyao has fixed a similar ICE:
https://gcc.gnu.org/pipermail/gcc-patches/2023-November/636156.html
This patch fixes ICE and use simplify_gen_subreg instead of gen_rtx_SUBREG as much as possible
to avoid the same ice happening again.
gcc/ChangeLog:
* config/loongarch/loongarch.cc (loongarch_try_expand_lsx_vshuf_const): Use
simplify_gen_subreg instead of gen_rtx_SUBREG.
(loongarch_expand_vec_perm_const_2): Ditto.
(loongarch_expand_vec_cond_expr): Ditto.
gcc/testsuite/ChangeLog:
* gcc.target/loongarch/pr112476-3.c: New test.
* gcc.target/loongarch/pr112476-4.c: New test.
Diffstat (limited to 'gcc/tree.cc')
0 files changed, 0 insertions, 0 deletions