Robin Dapp <rdapp....@gmail.com> writes: > @@ -1758,16 +1759,19 @@ extract_bit_field_1 (rtx str_rtx, poly_uint64 > bitsize, poly_uint64 bitnum, > if (VECTOR_MODE_P (outermode) && !MEM_P (op0)) > { > scalar_mode innermode = GET_MODE_INNER (outermode); > enum insn_code icode > = convert_optab_handler (vec_extract_optab, outermode, innermode); > poly_uint64 pos; > - if (icode != CODE_FOR_nothing > - && known_eq (bitsize, GET_MODE_BITSIZE (innermode)) > - && multiple_p (bitnum, GET_MODE_BITSIZE (innermode), &pos)) > + if ((icode != CODE_FOR_nothing > + && known_eq (bitsize, GET_MODE_PRECISION (innermode)) > + && multiple_p (bitnum, GET_MODE_PRECISION (innermode), &pos)))
This adds an extra, unnecessary layer of bracketing. OK for the target-independent parts without that. Thanks, Richard > { > class expand_operand ops[3]; > > - create_output_operand (&ops[0], target, innermode); > + create_output_operand (&ops[0], target, > + insn_data[icode].operand[0].mode); > ops[0].target = 1; > create_input_operand (&ops[1], op0, outermode); > create_integer_operand (&ops[2], pos); > diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/partial/pr112773.c > b/gcc/testsuite/gcc.target/riscv/rvv/autovec/partial/pr112773.c > new file mode 100644 > index 00000000000..5f7374b0040 > --- /dev/null > +++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/partial/pr112773.c > @@ -0,0 +1,20 @@ > +/* { dg-do compile } */ > +/* { dg-additional-options "-march=rv32gcv_zvl256b -mabi=ilp32d -O3" } */ > + > +long long a; > +int b, c; > +int *d; > +void e(unsigned f) { > + for (;; ++c) > + if (f) { > + a = 0; > + for (; a <= 3; a++) { > + f = 0; > + for (; f <= 0; f++) > + if ((long)a) > + break; > + } > + if (b) > + *d = f; > + } > +}