diff mbox series

[6/6,CRIS,cc0-preparations] gcc.target/cris/dbr-1.c: New test.

Message ID 202002101702.01AH2P3J012815@ignucius.se.axis.com
State New
Headers show
Series None | expand

Commit Message

Hans-Peter Nilsson Feb. 10, 2020, 5:02 p.m. UTC
Random spotting.  Exposes the missed benefit for delay-slot
filling of a splitter for indexed addressing mode (the [rN+M]
one).  To be considered for common instructions and perhaps only
for suitable M; at least +-63 is obious (when there's a register
available) as both the original and the add fit in delay-slots.

I forgot to mention that all previously posted patches have been
regression-tested for cris-elf and all are committed.

---
 gcc/testsuite/gcc.target/cris/dbr-1.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 gcc/testsuite/gcc.target/cris/dbr-1.c
diff mbox series

Patch

diff --git a/gcc/testsuite/gcc.target/cris/dbr-1.c b/gcc/testsuite/gcc.target/cris/dbr-1.c
new file mode 100644
index 000000000..9f79a7627
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/dbr-1.c
@@ -0,0 +1,11 @@ 
+/* Check that delayed-branch-slot is able to fill a trivially fillable
+   slot.  The xfail is due to the "move.d [$r10+4],$r10" not being split
+   up into "addq 4,$r10" and "move.d [$r10],$r10"; both slottable and of
+   the same actual cost in size and cycles as the unsplit insn.  */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler-not "\tnop" { xfail *-*-* } } } */
+void *f(void **p)
+{
+  return p[1];
+}