https://gcc.gnu.org/g:e7923f0e56a9faff706edb4d4724b26601a0fa72
commit e7923f0e56a9faff706edb4d4724b26601a0fa72 Author: Jeremy_Robinson <[email protected]> Date: Fri Nov 6 07:35:42 2026 +0000 amdgcn: simt_vect: Load SImode (LDS) symbols with a plain move When an insn in a SIMT region uses a SYMBOL_REF, simt_vect loads it into a scalar register with movdi_symbol and broadcasts it. Symbols in the LDS address space, such as OpenACC gang-private variables, are SImode, and movdi_symbol then yields an SImode set with an SCC clobber that matches no pattern: at -O0 (where the address is not hoisted out of the region), OpenACC code with a gang-private array ICEs in extract_insn ("unrecognizable insn") in SIMT modes. Use a plain move for them. Assisted-by: Claude Opus 5.5 gcc/ChangeLog: * config/gcn/gcn-simt-vectorize.cc (pass_gcn_simt_vectorize::execute): Use a plain SET instead of gen_movdi_symbol for non-DImode SYMBOL_REFs and LABEL_REFs. Diff: --- gcc/config/gcn/gcn-simt-vectorize.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/config/gcn/gcn-simt-vectorize.cc b/gcc/config/gcn/gcn-simt-vectorize.cc index 3c35d1878f9d..499b9bdab869 100644 --- a/gcc/config/gcn/gcn-simt-vectorize.cc +++ b/gcc/config/gcn/gcn-simt-vectorize.cc @@ -1621,7 +1621,12 @@ pass_gcn_simt_vectorize::execute (function *fn) if (special_attr != SIMT_SPECIAL_SYMBOLS_OK) { rtx tmpdi = gen_reg_rtx (GET_MODE (x)); - rtx movdi_symbol = gen_movdi_symbol (tmpdi, x); + /* Symbols in the LDS address space (e.g. OpenACC + gang-private variables) are SImode; a plain move + loads them. */ + rtx movdi_symbol = (GET_MODE (x) == DImode + ? gen_movdi_symbol (tmpdi, x) + : gen_rtx_SET (tmpdi, x)); emit_insn_before (movdi_symbol, insn); rtx tmpv64di = gen_reg_rtx (insn_mode);
