https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118832
Bug ID: 118832 Summary: RISC-V: internal compiler error: could not split insn, with V+Zbb enabled Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: wangpengcheng.pp at bytedance dot com Target Milestone: --- This ICE was found when compiling linux kernel with V enabled (-O2 -march=rv64imafdcv_zbb -mabi=lp64d): ``` drivers/net/wireless/ath/ath9k/htc_drv_init.c: In function 'ath9k_multi_regread': [0/93] drivers/net/wireless/ath/ath9k/htc_drv_init.c:281:1: error: could not split insn 281 | } | ^ (insn 385 264 487 (set (reg:RVVM2DI 102 v6 [374]) (vec_duplicate:RVVM2DI (reg:DI 15 a5 [357]))) "drivers/net/wireless/ath/ath9k/htc_drv_init.c":279:10 discrim 6 3534 {*vec_duplicatervvm2di} (expr_list:REG_DEAD (reg:DI 15 a5 [357]) (nil))) during RTL pass: final drivers/net/wireless/ath/ath9k/htc_drv_init.c:281:1: internal compiler error: in final_scan_insn_1, at final.cc:2813 0x2ff05df internal_error(char const*, ...) ../../../gcc/gcc/diagnostic-global-context.cc:517 0xcb27db fancy_abort(char const*, int, char const*) ../../../gcc/gcc/diagnostic.cc:1722 0xb40b53 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) ../../../gcc/gcc/rtl-error.cc:108 0xacc011 final_scan_insn_1 ../../../gcc/gcc/final.cc:2813 0xfc754b final_scan_insn(rtx_insn*, _IO_FILE*, int, int, int*) ../../../gcc/gcc/final.cc:2892 0xfc7775 final_1 ../../../gcc/gcc/final.cc:1983 0xfc8226 rest_of_handle_final ../../../gcc/gcc/final.cc:4250 0xfc8226 execute ../../../gcc/gcc/final.cc:4328 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. ``` I have reduced the case: https://godbolt.org/z/G7rKn4aGn The initial finding is the ICE will disappear if `zbb` is not specified.