[gcc r17-3532] [committed] Fix minor arc testsuite regression

Jeff Law via Gcc-cvs <[email protected]>
Newsgroups gmane.comp.gcc.cvs
Message-ID <[email protected]>
https://gcc.gnu.org/g:b236deea5082eb240da32096845193ec163666ba

commit r17-3532-gb236deea5082eb240da32096845193ec163666ba
Author: Jeff Law <[email protected]>
Date:   Sat Aug 22 11:05:59 2026 -0600

    [committed] Fix minor arc testsuite regression
    
    This change:
    
    > commit aac02c9666184d19334a0527ec444b5e55fbd113 (HEAD)
    > Author: Konstantinos Eleftheriou <[email protected]>
    > Date:   Thu Jul 9 02:22:54 2026 -0700
    >
    >     widening_mul: Lower long-multiply chains to inline longhand
    >
    >     The forwprop long-multiply recognizer canonicalizes longhand
    >     high-part multiplies into
    >
    >       lhs = (N) (((2N) op1 * (2N) op2) >> N)
    [ ... ]
    
    Cause a minor testsuite regression on the arc port.  Basically it wants to see
    a all to muldi, but instead we component SI multiplies.  AFAICT the patch is
    behaving per design, so I've just twiddled the testsuite by adding
    -fno-expensive-optimizations  which restores the older code generation and the
    intent of the test.
    
    gcc/testsuite
            * gcc.target/arc/mulsi3_highpart-2.c: Disable -fexpensive-optimizations.

Diff:
---
 gcc/testsuite/gcc.target/arc/mulsi3_highpart-2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.target/arc/mulsi3_highpart-2.c b/gcc/testsuite/gcc.target/arc/mulsi3_highpart-2.c
index 22b28cf25070..d478ad43810e 100644
--- a/gcc/testsuite/gcc.target/arc/mulsi3_highpart-2.c
+++ b/gcc/testsuite/gcc.target/arc/mulsi3_highpart-2.c
@@ -1,7 +1,7 @@
 /* { dg-do run } */
 /* { dg-skip-if "ARC700 always has mpy option on" { arc700 } } */
 /* { dg-skip-if "ARC600 doesn't have mpy instruction" { arc6xx } } */
-/* { dg-options "-O2 -mmpy-option=0 -w -save-temps" } */
+/* { dg-options "-O2 -mmpy-option=0 -w -save-temps -fno-expensive-optimizations" } */
 
 #include <stdlib.h>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.