]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[testsuite] [arm] adjust wmul expectations [PR113560]
authorAlexandre Oliva <oliva@adacore.com>
Thu, 16 Jan 2025 23:19:50 +0000 (20:19 -0300)
committerAlexandre Oliva <oliva@gnu.org>
Thu, 16 Jan 2025 23:27:13 +0000 (20:27 -0300)
Since the machine-independent widening multiply logic was improved
PR113560, ARM's wmul-[567].c fail.  AFAICT the logic takes advantage
of the fact that, after zero-extending a narrow integral type to a
wider type, further zero- or sign-extending is equivalent, which
enables different instructions to be used for equivalent effect.

Adjust the tests to accept all the equivalent instructions that can be
used.

for  gcc/testsuite/ChangeLog

PR target/113560
* gcc.target/arm/wmul-5.c: Accept other mla instructions.
* gcc.target/arm/wmul-6.c: Likewise.
* gcc.target/arm/wmul-7.c: Likewise.

gcc/testsuite/gcc.target/arm/wmul-5.c
gcc/testsuite/gcc.target/arm/wmul-6.c
gcc/testsuite/gcc.target/arm/wmul-7.c

index 9f29a81c0b8bdea01a6e561ac762744327be2f8f..282e007d9be3f58c9aaaabade79105ef23831eb1 100644 (file)
@@ -8,4 +8,6 @@ foo (long long a, char *b, char *c)
   return a + *b * *c;
 }
 
-/* { dg-final { scan-assembler "umlal" } } */
+/* smlalbb after zero-extending the chars to HImode, or either signed- or
+   unsigned-widening multiply after extending them to SImode.  */
+/* { dg-final { scan-assembler {(?:smlalbb|[us]mlal)} } } */
index babdaab1efd55d356d6e5999023df9915caabc45..05247e00c5ebcad11934c770f0ab53dc8e613bfe 100644 (file)
@@ -8,4 +8,6 @@ foo (long long a, unsigned char *b, signed char *c)
   return a + (long long)*b * (long long)*c;
 }
 
-/* { dg-final { scan-assembler "smlalbb" } } */
+/* After zero-extending B and sign-extending C to [HS]imode, either
+   signed-widening multiply will do.  */
+/* { dg-final { scan-assembler {smlal(?:bb)?} } } */
index 2db4ad4e10d525d082dc2e3938f08beb95009c75..26933c42401a3c5c81e548530f17e94a3732ee20 100644 (file)
@@ -8,4 +8,6 @@ foo (unsigned long long a, unsigned char *b, unsigned short *c)
   return a + *b * *c;
 }
 
-/* { dg-final { scan-assembler "umlal" } } */
+/* After zero-extending both to SImode, either signed- or unsigned-widening
+   multiply will do.  */
+/* { dg-final { scan-assembler {[us]mlal} } } */