aboutsummaryrefslogtreecommitdiff
path: root/gcc/cfgexpand.cc
diff options
context:
space:
mode:
authorRobin Dapp <rdapp@ventanamicro.com>2024-08-20 14:02:09 +0200
committerRobin Dapp <rdapp@ventanamicro.com>2024-08-23 11:36:05 +0200
commit96fe95bac67c7303dc811c04f5e99cc959a7182a (patch)
treea0548a2bf04a8a44fff7bc53671e895d876db887 /gcc/cfgexpand.cc
parentc22d57cdc52d990eb7d353fa82c67882bc824d40 (diff)
downloadgcc-96fe95bac67c7303dc811c04f5e99cc959a7182a.zip
gcc-96fe95bac67c7303dc811c04f5e99cc959a7182a.tar.gz
gcc-96fe95bac67c7303dc811c04f5e99cc959a7182a.tar.bz2
optabs-query: Use opt_machine_mode for smallest_int_mode_for_size [PR115495].
In get_best_extraction_insn we use smallest_int_mode_for_size with struct_bits as size argument. PR115495 has struct_bits = 256 and we don't have a mode for that. This patch makes smallest_mode_for_size and smallest_int_mode_for_size return opt modes so we can just skip over the loop when there is no mode. PR middle-end/115495 gcc/ChangeLog: * cfgexpand.cc (expand_debug_expr): Require mode. * combine.cc (make_extraction): Ditto. * config/aarch64/aarch64.cc (aarch64_expand_cpymem): Ditto. (aarch64_expand_setmem): Ditto. * config/arc/arc.cc (arc_expand_cpymem): Ditto. * config/arm/arm.cc (arm_expand_divmod_libfunc): Ditto. * config/i386/i386.cc (ix86_get_mask_mode): Ditto. * config/rs6000/predicates.md: Ditto. * config/rs6000/rs6000.cc (vspltis_constant): Ditto. * config/s390/s390.cc (s390_expand_insv): Ditto. * config/sparc/sparc.cc (assign_int_registers): Ditto. * coverage.cc (get_gcov_type): Ditto. (get_gcov_unsigned_t): Ditto. * dse.cc (find_shift_sequence): Ditto. * expmed.cc (store_integral_bit_field): Ditto. * expr.cc (convert_mode_scalar): Ditto. (op_by_pieces_d::smallest_fixed_size_mode_for_size): Ditto. (emit_block_move_via_oriented_loop): Ditto. (copy_blkmode_to_reg): Ditto. (store_field): Ditto. * internal-fn.cc (expand_arith_overflow): Ditto. * machmode.h (HAVE_MACHINE_MODES): Ditto. (smallest_mode_for_size): Use opt_machine_mode. (smallest_int_mode_for_size): Use opt_scalar_int_mode. * optabs-query.cc (get_best_extraction_insn): Require mode. * optabs.cc (expand_twoval_binop_libfunc): Ditto. * stor-layout.cc (smallest_mode_for_size): Return opt_machine_mode. (layout_type): Require mode. (initialize_sizetypes): Ditto. * tree-ssa-loop-manip.cc (canonicalize_loop_ivs): Ditto. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/pr115495.c: New test. gcc/ada/ChangeLog: * gcc-interface/utils2.cc (fast_modulo_reduction): Require mode. (nonbinary_modular_operation): Ditto.
Diffstat (limited to 'gcc/cfgexpand.cc')
-rw-r--r--gcc/cfgexpand.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cfgexpand.cc b/gcc/cfgexpand.cc
index dad3ae1..13f8c08 100644
--- a/gcc/cfgexpand.cc
+++ b/gcc/cfgexpand.cc
@@ -4867,7 +4867,7 @@ expand_debug_expr (tree exp)
if (maybe_gt (bitsize, MAX_BITSIZE_MODE_ANY_INT))
return NULL;
/* Bitfield. */
- mode1 = smallest_int_mode_for_size (bitsize);
+ mode1 = smallest_int_mode_for_size (bitsize).require ();
}
poly_int64 bytepos = bits_to_bytes_round_down (bitpos);
if (maybe_ne (bytepos, 0))