re PR rtl-optimization/47299 (Widening multiply optimization generates bad code)
authorJakub Jelinek <jakub@redhat.com>
Tue, 18 Jan 2011 07:45:12 +0000 (08:45 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 18 Jan 2011 07:45:12 +0000 (08:45 +0100)
commite7ef91dc8eb398de7b6c780b00f1360dafd84798
tree020c8a49163b7cf9347b1c3455970378ec548bc7
parentfb70168707ecbe4175c069f6c36baa8986a075bd
re PR rtl-optimization/47299 (Widening multiply optimization generates bad code)

PR rtl-optimization/47299
* expr.c (expand_expr_real_2) <case WIDEN_MULT_EXPR>: Don't use
subtarget.  Use normal multiplication if both operands are
constants.
* expmed.c (expand_widening_mult): Don't try to optimize constant
multiplication if op0 has VOIDmode.  Convert op1 constant to mode
before using it.

* gcc.c-torture/execute/pr47299.c: New test.

From-SVN: r168944
gcc/ChangeLog
gcc/expmed.c
gcc/expr.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/pr47299.c [new file with mode: 0644]