Commit c933b893 by Jeff Law Committed by Jeff Law

optabs.c (expand_binop): Pass INT_MODE to operand_subword_force iff the operand is a constant.

	* optabs.c (expand_binop): Pass INT_MODE to operand_subword_force
	iff the operand is a constant.

	* gcc.c-torture/compile/20181114.c: New test.

2018-11-14  Ilya Leoshkevich  <iii@linux.ibm.com>

From-SVN: r266151
parent ff361cc6
2018-11-14 Jeff Law <law@redhat.com>
* optabs.c (expand_binop): Pass INT_MODE to operand_subword_force
iff the operand is a constant.
2018-11-14 Aldy Hernandez <aldyh@redhat.com> 2018-11-14 Aldy Hernandez <aldyh@redhat.com>
* gimple-ssa-evrp-analyze.c * gimple-ssa-evrp-analyze.c
...@@ -1377,12 +1377,14 @@ expand_binop (machine_mode mode, optab binoptab, rtx op0, rtx op1, ...@@ -1377,12 +1377,14 @@ expand_binop (machine_mode mode, optab binoptab, rtx op0, rtx op1,
start_sequence (); start_sequence ();
/* Do the actual arithmetic. */ /* Do the actual arithmetic. */
enum machine_mode op0_mode = CONSTANT_P (op0) ? int_mode : VOIDmode;
enum machine_mode op1_mode = CONSTANT_P (op1) ? int_mode : VOIDmode;
for (i = 0; i < GET_MODE_BITSIZE (int_mode) / BITS_PER_WORD; i++) for (i = 0; i < GET_MODE_BITSIZE (int_mode) / BITS_PER_WORD; i++)
{ {
rtx target_piece = operand_subword (target, i, 1, int_mode); rtx target_piece = operand_subword (target, i, 1, int_mode);
rtx x = expand_binop (word_mode, binoptab, rtx x = expand_binop (word_mode, binoptab,
operand_subword_force (op0, i, int_mode), operand_subword_force (op0, i, op0_mode),
operand_subword_force (op1, i, int_mode), operand_subword_force (op1, i, op1_mode),
target_piece, unsignedp, next_methods); target_piece, unsignedp, next_methods);
if (x == 0) if (x == 0)
......
2018-11-14 Jeff Law <law@redhat.com>
* gcc.c-torture/compile/20181114.c: New test.
2018-11-14 Richard Biener <rguenther@suse.de> 2018-11-14 Richard Biener <rguenther@suse.de>
PR middle-end/87985 PR middle-end/87985
......
int
_vfprintf_r (double fp)
{
if (__builtin_signbit (fp))
return '-';
}
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