aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2021-02-17 19:05:35 +0100
committerHans-Peter Nilsson <hp@axis.com>2021-02-22 18:00:53 +0100
commita7de0ffa34a9559919b14094b804175d7d9b446f (patch)
tree9c1f49d960c62cce5b70ad26a99faa22a8bde4bf
parentdd7376371f9673073beb5eec0e5a75109266b4c9 (diff)
downloadgcc-a7de0ffa34a9559919b14094b804175d7d9b446f.zip
gcc-a7de0ffa34a9559919b14094b804175d7d9b446f.tar.gz
gcc-a7de0ffa34a9559919b14094b804175d7d9b446f.tar.bz2
testsuite/gcc.target/cris/biap.c: Add a Y+=X*2 to the Y+=X*4.
Also, tweak the scan-assembler regexps to include a tab, lest they may spuriously match file-paths in the emitted assembly code, should some be added at some point. And, add "mul", "move" and (non-addi-)"add" to insns that shouldn't appear. gcc/testsuite: * gcc.target/cris/biap.c: Add a Y+=X*2 to the Y+=X*4.
-rw-r--r--gcc/testsuite/gcc.target/cris/biap.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/testsuite/gcc.target/cris/biap.c b/gcc/testsuite/gcc.target/cris/biap.c
index 1f3b436..f31e61c 100644
--- a/gcc/testsuite/gcc.target/cris/biap.c
+++ b/gcc/testsuite/gcc.target/cris/biap.c
@@ -2,10 +2,15 @@
See also PR37939. */
/* { dg-do compile } */
/* { dg-options "-O2" } */
-/* { dg-final { scan-assembler "addi" } } */
-/* { dg-final { scan-assembler-not "lsl" } } */
+/* { dg-final { scan-assembler-times "\taddi" 2 } } */
+/* { dg-final { scan-assembler-not "\tlsl|\tmul|\tmove|\tadd\[^i\]" } } */
int xyzzy (int r10, int r11)
{
return r11 * 4 + r10;
}
+
+int plugh (int r10, int r11)
+{
+ return r11 * 2 + r10;
+}