On 07/13/2017 02:45 AM, Richard Sandiford wrote: > Replace checks of "GET_MODE_CLASS (...) == MODE_INT" with > "is_int_mode (..., &var)", in cases where it becomes useful > to refer to the mode as a scalar_int_mode. > > 2017-07-13 Richard Sandiford <richard.sandif...@linaro.org> > Alan Hayward <alan.hayw...@arm.com> > David Sherwood <david.sherw...@arm.com> > > gcc/ > * machmode.h (is_int_mode): New fuction. > * combine.c (find_split_point): Use it. > (combine_simplify_rtx): Likewise. > (simplify_if_then_else): Likewise. > (simplify_set): Likewise. > (simplify_shift_const_1): Likewise. > (simplify_comparison): Likewise. > * config/aarch64/aarch64.c (aarch64_rtx_costs): Likewise. > * cse.c (notreg_cost): Likewise. > (cse_insn): Likewise. > * cselib.c (cselib_lookup_1): Likewise. > * dojump.c (do_jump_1): Likewise. > (do_compare_rtx_and_jump): Likewise. > * dse.c (get_call_args): Likewise. > * dwarf2out.c (rtl_for_decl_init): Likewise. > (native_encode_initializer): Likewise. > * expmed.c (emit_store_flag_1): Likewise. > (emit_store_flag): Likewise. > * expr.c (convert_modes): Likewise. > (store_field): Likewise. > (expand_expr_real_1): Likewise. > * fold-const.c (fold_read_from_constant_string): Likewise. > * gimple-ssa-sprintf.c (get_format_string): Likewise. > * optabs-libfuncs.c (gen_int_libfunc): Likewise. > * optabs.c (expand_binop): Likewise. > (expand_unop): Likewise. > (expand_abs_nojump): Likewise. > (expand_one_cmpl_abs_nojump): Likewise. > * simplify-rtx.c (mode_signbit_p): Likewise. > (val_signbit_p): Likewise. > (val_signbit_known_set_p): Likewise. > (val_signbit_known_clear_p): Likewise. > (simplify_relational_operation_1): Likewise. > * stor-layout.c (vector_type_mode): Likewise. > > gcc/go/ > * go-lang.c (go_langhook_type_for_mode): Use is_int_mode. OK. FWIW the "mode" -> "int_mode" that occurs in here is slightly worrisome, but probably a good thing to do.
My worry is whether or not all the paths from the assignment to INT_MODE to all the uses that were converted have been checked to make sure they didn't modify MODE. It's easy to miss. Anyway, it's something to keep in mind, partciularly in older code where the definition and uses are potentially far away from each other. jeff