The complex/float && and || reduction patch missed a target testcase (→ attached) which revealed that also a SIMT needed some special handling, but just runs on non-SIMT systems. The omp-low.c patch is rather simple - and I think it semantically okay. [Note to the change: It looks more completed than it is: - moving 'zero' decl out of the 'if' block - moving that if block before the 'if (sctx.is_simt)' block - 'if (is_fp_and_or)' to the 'if (sctx.is_simt)' block.] I think at least the testcase should be added, possibly also the omp-low.c change – albeit I get a later ICE (see below), which needs either an XFAIL or a fix. * * * ICE with NVPTX: When the device lto1 starts, it fails when expanding the intrinsic XCHG_BFLY function. We have 'ivar' = complex float, which at rtx level is converted to a concatenation (via gen_reg_rtx()). In omp-low.c: IFN_GOMP_SIMT_XCHG_BFLY (TREE_TYPE(ivar), ivar, simt_lane) Later in expand_GOMP_SIMT_XCHG_BFLY, we call: 371 expand_insn (targetm.code_for_omp_simt_xchg_bfly, 3, ops); which fails by running into unreachable of 'expand_insn' 7844 if (!maybe_expand_insn (icode, nops, ops)) 7845 gcc_unreachable (); icode = CODE_FOR_omp_simt_xchg_bfly nops = 3 (gdb) p ops[0]->type $3 = EXPAND_OUTPUT (gdb) p debug(ops[0]->value) (concat:SC (reg:SF 85) (reg:SF 86)) (gdb) p ops[1]->type $5 = EXPAND_INPUT (gdb) p debug(ops[1]->value) (concat:SC (reg:SF 26 [ orfc ]) (reg:SF 27 [ orfc+4 ])) (gdb) p ops[2]->type $7 = EXPAND_INPUT (gdb) p debug(ops[2]->value) (reg:SI 52 [ _74 ]) The mentioned concat happens in How to fix this? Or does this fall into the same category as PR100321 (fixed by: r12-395, Disable SIMT for user-defined reduction) with its follow-up PR 100408? Small testcase is: _Complex float rcf[1024]; int reduction_or () { _Complex float orfc = 0; for (int i=0; i < 1024; ++i) orfc = orfc || rcf[i]; return __real__ orfc; } Tobias ----------------- Mentor Graphics (Deutschland) GmbH, Arnulfstrasse 201, 80634 München Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Frank Thürauf