diff options
author | Hans-Peter Nilsson <hp@bitrange.com> | 2024-05-08 04:11:20 +0200 |
---|---|---|
committer | Hans-Peter Nilsson <hp@bitrange.com> | 2024-05-08 04:11:20 +0200 |
commit | f6ce85502eb2e4e7bbd9b3c6c1c065a004f8f531 (patch) | |
tree | 14712ba93685760dbb4f6f1759b3a4cc186a84f8 | |
parent | e60032b382364897a58e67994baac896bcd03327 (diff) | |
download | gcc-f6ce85502eb2e4e7bbd9b3c6c1c065a004f8f531.zip gcc-f6ce85502eb2e4e7bbd9b3c6c1c065a004f8f531.tar.gz gcc-f6ce85502eb2e4e7bbd9b3c6c1c065a004f8f531.tar.bz2 |
Revert "Revert "testsuite/gcc.target/cris/pr93372-2.c: Handle xpass from combine improvement""
This reverts commit 39f81924d88e3cc197fc3df74204c9b5e01e12f7.
-rw-r--r-- | gcc/testsuite/gcc.target/cris/pr93372-2.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/gcc/testsuite/gcc.target/cris/pr93372-2.c b/gcc/testsuite/gcc.target/cris/pr93372-2.c index 912069c..2ef6471 100644 --- a/gcc/testsuite/gcc.target/cris/pr93372-2.c +++ b/gcc/testsuite/gcc.target/cris/pr93372-2.c @@ -1,19 +1,20 @@ /* Check that eliminable compare-instructions are eliminated. */ /* { dg-do compile } */ /* { dg-options "-O2" } */ -/* { dg-final { scan-assembler-not "\tcmp|\ttest" { xfail *-*-* } } } */ -/* { dg-final { scan-assembler-not "\tnot" { xfail cc0 } } } */ -/* { dg-final { scan-assembler-not "\tlsr" { xfail cc0 } } } */ +/* { dg-final { scan-assembler-not "\tcmp|\ttest" } } */ +/* { dg-final { scan-assembler-not "\tnot" } } */ +/* { dg-final { scan-assembler-not "\tlsr" } } */ +/* We should get just one move, storing the result into *d. */ +/* { dg-final { scan-assembler-times "\tmove" 1 } } */ int f(int a, int b, int *d) { int c = a - b; - /* Whoops! We get a cmp.d with the original operands here. */ + /* We used to get a cmp.d with the original operands here. */ *d = (c == 0); - /* Whoops! While we don't get a test.d for the result here for cc0, - we get a sequence of insns: a move, a "not" and a shift of the - subtraction-result, where a simple "spl" would have done. */ + /* We used to get a suboptimal sequence, but now we get the optimal "sge" + (a.k.a "spl") re-using flags from the subtraction. */ return c >= 0; } |