@@ -1506,7 +1506,7 @@ public:
rtx
expand (function_expander &e) const override
{
- machine_mode tuple_mode = TYPE_MODE (TREE_TYPE (e.call_expr));
+ machine_mode tuple_mode = e.result_mode ();
insn_code icode = convert_optab_handler (vec_mask_load_lanes_optab,
tuple_mode, e.vector_mode (0));
return e.use_contiguous_load_insn (icode);
@@ -2802,7 +2802,7 @@ function_expander::get_fallback_value (machine_mode mode, unsigned int nops,
rtx
function_expander::get_reg_target ()
{
- machine_mode target_mode = TYPE_MODE (TREE_TYPE (TREE_TYPE (fndecl)));
+ machine_mode target_mode = result_mode ();
if (!possible_target || GET_MODE (possible_target) != target_mode)
possible_target = gen_reg_rtx (target_mode);
return possible_target;
@@ -529,6 +529,8 @@ public:
insn_code direct_optab_handler_for_sign (optab, optab, unsigned int = 0,
machine_mode = E_VOIDmode);
+ machine_mode result_mode () const;
+
bool overlaps_input_p (rtx);
rtx convert_to_pmode (rtx);
@@ -878,6 +880,13 @@ function_base::call_properties (const function_instance &instance) const
return flags;
}
+/* Return the mode of the result of a call. */
+inline machine_mode
+function_expander::result_mode () const
+{
+ return TYPE_MODE (TREE_TYPE (TREE_TYPE (fndecl)));
+}
+
}
#endif