Commit ff63d754 by Andrew Stubbs Committed by Andrew Stubbs

tree-ssa-math-opts.c (is_widening_mult_p): Remove FIXME.

2011-08-19  Andrew Stubbs  <ams@codesourcery.com>

	gcc/
	* tree-ssa-math-opts.c (is_widening_mult_p): Remove FIXME.
	Ensure the the larger type is the first operand.

	gcc/testsuite/
	* gcc.target/arm/wmul-7.c: New file.

From-SVN: r177906
parent db719f50
2011-08-19 Andrew Stubbs <ams@codesourcery.com> 2011-08-19 Andrew Stubbs <ams@codesourcery.com>
* tree-ssa-math-opts.c (is_widening_mult_p): Remove FIXME.
Ensure the the larger type is the first operand.
2011-08-19 Andrew Stubbs <ams@codesourcery.com>
* tree-ssa-math-opts.c (convert_mult_to_widen): Convert * tree-ssa-math-opts.c (convert_mult_to_widen): Convert
unsupported unsigned multiplies to signed. unsupported unsigned multiplies to signed.
(convert_plusminus_to_widen): Likewise. (convert_plusminus_to_widen): Likewise.
......
2011-08-19 Andrew Stubbs <ams@codesourcery.com> 2011-08-19 Andrew Stubbs <ams@codesourcery.com>
* gcc.target/arm/wmul-7.c: New file.
2011-08-19 Andrew Stubbs <ams@codesourcery.com>
* gcc.target/arm/wmul-6.c: New file. * gcc.target/arm/wmul-6.c: New file.
2011-08-19 Andrew Stubbs <ams@codesourcery.com> 2011-08-19 Andrew Stubbs <ams@codesourcery.com>
......
/* { dg-do compile } */
/* { dg-options "-O2" } */
/* { dg-require-effective-target arm_dsp } */
unsigned long long
foo (unsigned long long a, unsigned char *b, unsigned short *c)
{
return a + *b * *c;
}
/* { dg-final { scan-assembler "umlal" } } */
...@@ -2054,9 +2054,17 @@ is_widening_mult_p (gimple stmt, ...@@ -2054,9 +2054,17 @@ is_widening_mult_p (gimple stmt,
*type2_out = *type1_out; *type2_out = *type1_out;
} }
/* FIXME: remove this restriction. */ /* Ensure that the larger of the two operands comes first. */
if (TYPE_PRECISION (*type1_out) != TYPE_PRECISION (*type2_out)) if (TYPE_PRECISION (*type1_out) < TYPE_PRECISION (*type2_out))
return false; {
tree tmp;
tmp = *type1_out;
*type1_out = *type2_out;
*type2_out = tmp;
tmp = *rhs1_out;
*rhs1_out = *rhs2_out;
*rhs2_out = tmp;
}
return true; return true;
} }
......
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