aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorAndrew Stubbs <ams@gcc.gnu.org>2011-06-07 10:58:16 +0000
committerAndrew Stubbs <ams@gcc.gnu.org>2011-06-07 10:58:16 +0000
commitc536876e065822e33b5c5019d93e527012dda160 (patch)
tree976e83087ab821ec0d3bd318f9d66c071893b016 /gcc/doc
parent308dc890dd4315560088e8e012d7ebddf0d887e7 (diff)
downloadgcc-c536876e065822e33b5c5019d93e527012dda160.zip
gcc-c536876e065822e33b5c5019d93e527012dda160.tar.gz
gcc-c536876e065822e33b5c5019d93e527012dda160.tar.bz2
simplify-rtx.c (simplify_unary_operation_1): Canonicalize widening multiplies.
2011-06-07 Bernd Schmidt <bernds@codesourcery.com> Andrew Stubbs <ams@codesourcery.com> gcc/ * simplify-rtx.c (simplify_unary_operation_1): Canonicalize widening multiplies. * doc/md.texi (Canonicalization of Instructions): Document widening multiply canonicalization. gcc/testsuite/ * gcc.target/arm/mla-2.c: New test. From-SVN: r174740
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/md.texi17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi
index 6fdcce5..0023405 100644
--- a/gcc/doc/md.texi
+++ b/gcc/doc/md.texi
@@ -5840,6 +5840,23 @@ Equality comparisons of a group of bits (usually a single bit) with zero
will be written using @code{zero_extract} rather than the equivalent
@code{and} or @code{sign_extract} operations.
+@cindex @code{mult}, canonicalization of
+@item
+@code{(sign_extend:@var{m1} (mult:@var{m2} (sign_extend:@var{m2} @var{x})
+(sign_extend:@var{m2} @var{y})))} is converted to @code{(mult:@var{m1}
+(sign_extend:@var{m1} @var{x}) (sign_extend:@var{m1} @var{y}))}, and likewise
+for @code{zero_extend}.
+
+@item
+@code{(sign_extend:@var{m1} (mult:@var{m2} (ashiftrt:@var{m2}
+@var{x} @var{s}) (sign_extend:@var{m2} @var{y})))} is converted
+to @code{(mult:@var{m1} (sign_extend:@var{m1} (ashiftrt:@var{m2}
+@var{x} @var{s})) (sign_extend:@var{m1} @var{y}))}, and likewise for
+patterns using @code{zero_extend} and @code{lshiftrt}. If the second
+operand of @code{mult} is also a shift, then that is extended also.
+This transformation is only applied when it can be proven that the
+original operation had sufficient precision to prevent overflow.
+
@end itemize
Further canonicalization rules are defined in the function