public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/vendors/riscv/heads/gcc-13-with-riscv-opts)] RISC-V/testsuite/pr111466.c: update test and expected output
@ 2023-10-23  2:11 Jeff Law
  0 siblings, 0 replies; only message in thread
From: Jeff Law @ 2023-10-23  2:11 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:2332d766f1fa0ca75eabb93b9b7cbf01df87b184

commit 2332d766f1fa0ca75eabb93b9b7cbf01df87b184
Author: Vineet Gupta <vineetg@rivosinc.com>
Date:   Tue Oct 17 10:05:41 2023 -0700

    RISC-V/testsuite/pr111466.c: update test and expected output
    
    Update the test to potentially generate two SEXT.W instructions: one for
    incoming function arg, other for function return.
    
    But after commit 8eb9cdd14218
    ("expr: don't clear SUBREG_PROMOTED_VAR_P flag for a promoted subreg")
    the test is not supposed to generate either of them so fix the expected
    assembler output which was errorneously introduced by commit above.
    
    gcc/testsuite/ChangeLog:
            * gcc.target/riscv/pr111466.c (foo2): Change return to unsigned
            int as that will potentially generate two SEXT.W instructions.
            dg-final: Change to scan-assembler-not SEXT.W.
    
    Signed-off-by: Vineet Gupta <vineetg@rivosinc.com>
    (cherry picked from commit 9cad42786ca28461633d524bbb6480f388bfdc55)

Diff:
---
 gcc/testsuite/gcc.target/riscv/pr111466.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/testsuite/gcc.target/riscv/pr111466.c b/gcc/testsuite/gcc.target/riscv/pr111466.c
index 007792466a51..3348d593813d 100644
--- a/gcc/testsuite/gcc.target/riscv/pr111466.c
+++ b/gcc/testsuite/gcc.target/riscv/pr111466.c
@@ -4,7 +4,7 @@
 /* { dg-options "-march=rv64gc_zba_zbs -mabi=lp64" } */
 /* { dg-skip-if "" { *-*-* } { "-O0" } } */
 
-int foo2(int unused, int n, unsigned y, unsigned delta){
+unsigned int foo2(int unused, int n, unsigned y, unsigned delta){
   int s = 0;
   unsigned int x = 0;
   for (;x<n;x +=delta)
@@ -12,4 +12,4 @@ int foo2(int unused, int n, unsigned y, unsigned delta){
   return s;
 }
 
-/* { dg-final { scan-assembler "\msext\M" } } */
+/* { dg-final { scan-assembler-not "\msext\M" } } */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-10-23  2:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-23  2:11 [gcc(refs/vendors/riscv/heads/gcc-13-with-riscv-opts)] RISC-V/testsuite/pr111466.c: update test and expected output Jeff Law

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).