diff options
author | Alexandre Oliva <oliva@adacore.com> | 2025-01-16 20:19:50 -0300 |
---|---|---|
committer | Alexandre Oliva <oliva@gnu.org> | 2025-01-16 20:27:13 -0300 |
commit | fed57c8ec95ce3d86e74c5afb73a3a4a499d4ec4 (patch) | |
tree | 6ddea22009b469848c93f3cbc94d8736bd30099a | |
parent | bc6e3a03b9ac6ad901ff67fd2a561e36c83d6a48 (diff) | |
download | gcc-fed57c8ec95ce3d86e74c5afb73a3a4a499d4ec4.zip gcc-fed57c8ec95ce3d86e74c5afb73a3a4a499d4ec4.tar.gz gcc-fed57c8ec95ce3d86e74c5afb73a3a4a499d4ec4.tar.bz2 |
[testsuite] [arm] adjust wmul expectations [PR113560]
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.
-rw-r--r-- | gcc/testsuite/gcc.target/arm/wmul-5.c | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/arm/wmul-6.c | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/arm/wmul-7.c | 4 |
3 files changed, 9 insertions, 3 deletions
diff --git a/gcc/testsuite/gcc.target/arm/wmul-5.c b/gcc/testsuite/gcc.target/arm/wmul-5.c index 9f29a81..282e007 100644 --- a/gcc/testsuite/gcc.target/arm/wmul-5.c +++ b/gcc/testsuite/gcc.target/arm/wmul-5.c @@ -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)} } } */ diff --git a/gcc/testsuite/gcc.target/arm/wmul-6.c b/gcc/testsuite/gcc.target/arm/wmul-6.c index babdaab..05247e00 100644 --- a/gcc/testsuite/gcc.target/arm/wmul-6.c +++ b/gcc/testsuite/gcc.target/arm/wmul-6.c @@ -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)?} } } */ diff --git a/gcc/testsuite/gcc.target/arm/wmul-7.c b/gcc/testsuite/gcc.target/arm/wmul-7.c index 2db4ad4..26933c4 100644 --- a/gcc/testsuite/gcc.target/arm/wmul-7.c +++ b/gcc/testsuite/gcc.target/arm/wmul-7.c @@ -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} } } */ |