]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR rtl-optimization/42575 (arm-eabi-gcc 64-bit multiply weirdness)
authorMaxim Kuvyrkov <maxim@codesourcery.com>
Wed, 18 Aug 2010 10:34:02 +0000 (10:34 +0000)
committerMaxim Kuvyrkov <mkuvyrkov@gcc.gnu.org>
Wed, 18 Aug 2010 10:34:02 +0000 (10:34 +0000)
gcc/
PR rtl-optimization/42575
* optabs.c (expand_doubleword_mult): Generate new pseudos to shorten
live ranges.

gcc/testsuite/
PR rtl-optimization/42575
* gcc.target/pr42575.c: New test.

From-SVN: r163334

gcc/ChangeLog
gcc/optabs.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arm/pr42575.c [new file with mode: 0644]

index 48ee83322e94a2200dd8bc3e82aabf203c3bad73..c16adad4bd75e22cb0872bc9478045a199f7ad91 100644 (file)
@@ -1,3 +1,9 @@
+2010-08-18  Maxim Kuvyrkov  <maxim@codesourcery.com>
+
+       PR rtl-optimization/42575
+       * optabs.c (expand_doubleword_mult): Generate new pseudos to shorten
+       live ranges.
+
 2010-08-18  Marcus Shawcroft  <marcus.shawcroft@arm.com>
 
        * config/arm/arm-protos.h (arm_expand_sync): New.
index b9db02fe83fcc82c2560a5640442938cdd04c59f..1fcbedc0089e4a5bbf39181082c481d497c40014 100644 (file)
@@ -1257,7 +1257,7 @@ expand_doubleword_mult (enum machine_mode mode, rtx op0, rtx op1, rtx target,
   /* OP1_HIGH should now be dead.  */
 
   adjust = expand_binop (word_mode, add_optab, adjust, temp,
-                        adjust, 0, OPTAB_DIRECT);
+                        NULL_RTX, 0, OPTAB_DIRECT);
 
   if (target && !REG_P (target))
     target = NULL_RTX;
@@ -1274,8 +1274,7 @@ expand_doubleword_mult (enum machine_mode mode, rtx op0, rtx op1, rtx target,
 
   product_high = operand_subword (product, high, 1, mode);
   adjust = expand_binop (word_mode, add_optab, product_high, adjust,
-                        REG_P (product_high) ? product_high : adjust,
-                        0, OPTAB_DIRECT);
+                        NULL_RTX, 0, OPTAB_DIRECT);
   emit_move_insn (product_high, adjust);
   return product;
 }
index 10a8aff7a0d2f36f9980de2059a29ce02032444c..d71fa99239e01dd7215a565f0ed127001ac3e9f2 100644 (file)
@@ -1,3 +1,8 @@
+2010-08-18  Maxim Kuvyrkov  <maxim@codesourcery.com>
+
+       PR rtl-optimization/42575
+       * gcc.target/pr42575.c: New test.
+
 2010-08-18  Iain Sandoe  <iains@gcc.gnu.org>
 
        * lib/target-supports.exp (check_effective_target_tls_emulated): New.
diff --git a/gcc/testsuite/gcc.target/arm/pr42575.c b/gcc/testsuite/gcc.target/arm/pr42575.c
new file mode 100644 (file)
index 0000000..474bf6c
--- /dev/null
@@ -0,0 +1,9 @@
+/* { dg-options "-O2 -march=armv7-a" }  */
+/* Make sure RA does good job allocating registers and avoids
+   unnecessary moves.  */
+/* { dg-final { scan-assembler-not "mov" } } */
+
+long long longfunc(long long x, long long y)
+{
+      return x * y;
+}