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.
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)} } } */
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)?} } } */
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} } } */