Commit a7adbbcb by H.J. Lu Committed by H.J. Lu

Promote the function argument before checking non-legitimate constant.

2011-07-05  H.J. Lu  <hongjiu.lu@intel.com>

	PR middle-end/47715
	* calls.c (precompute_register_parameters): Promote the function
	argument before checking non-legitimate constant.

From-SVN: r175864
parent cec11ec4
2011-07-05 H.J. Lu <hongjiu.lu@intel.com>
PR middle-end/47715
* calls.c (precompute_register_parameters): Promote the function
argument before checking non-legitimate constant.
2011-07-05 Sebastian Pop <sebastian.pop@amd.com>
PR tree-optimization/47654
......
......@@ -702,12 +702,6 @@ precompute_register_parameters (int num_actuals, struct arg_data *args,
pop_temp_slots ();
}
/* If the value is a non-legitimate constant, force it into a
pseudo now. TLS symbols sometimes need a call to resolve. */
if (CONSTANT_P (args[i].value)
&& !targetm.legitimate_constant_p (args[i].mode, args[i].value))
args[i].value = force_reg (args[i].mode, args[i].value);
/* If we are to promote the function arg to a wider mode,
do it now. */
......@@ -717,6 +711,12 @@ precompute_register_parameters (int num_actuals, struct arg_data *args,
TYPE_MODE (TREE_TYPE (args[i].tree_value)),
args[i].value, args[i].unsignedp);
/* If the value is a non-legitimate constant, force it into a
pseudo now. TLS symbols sometimes need a call to resolve. */
if (CONSTANT_P (args[i].value)
&& !targetm.legitimate_constant_p (args[i].mode, args[i].value))
args[i].value = force_reg (args[i].mode, args[i].value);
/* If we're going to have to load the value by parts, pull the
parts into pseudos. The part extraction process can involve
non-trivial computation. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment