public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jeff Law <law@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc(refs/vendors/riscv/heads/gcc-13-with-riscv-opts)] RISC-V/testsuite/pr111466.c: update test and expected output
Date: Mon, 23 Oct 2023 02:11:46 +0000 (GMT)	[thread overview]
Message-ID: <20231023021146.480E83858D39@sourceware.org> (raw)

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" } } */

                 reply	other threads:[~2023-10-23  2:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231023021146.480E83858D39@sourceware.org \
    --to=law@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).