Whoops, attached wrong patch to last message.  This is the right patch.

Trivial fallout from the recent combine work. We end up with a srai rather than an xor in some of the saturation sequences. Both variants look equally performant, so I'm just adjusting the expected test output.

Pushing to the trunk.

Jeff
commit 4645d092969face6aa1da4c919924697185f9cf9
Author: Jeff Law <j...@ventanamicro.com>
Date:   Wed Apr 9 08:33:17 2025 -0600

    [RISC-V] Fix more fallout from combine.c changes
    
    Trivial fallout from the recent combine work.  We end up with a srai rather
    than an xor in some of the saturation sequences.  Both variants look equally
    performant, so I'm just adjusting the expected test output.
    
    gcc/testsuite
            * gcc.target/riscv/sat/sat_s_sub-1-i64.c: Update expected output.
            * gcc.target/riscv/sat/sat_s_sub-2-i64.c: Likewise.
            * gcc.target/riscv/sat/sat_s_sub-3-i64.c: Likewise.
            * gcc.target/riscv/sat/sat_s_sub-4-i64.c: Likewise.

diff --git a/gcc/testsuite/gcc.target/riscv/sat/sat_s_sub-1-i64.c 
b/gcc/testsuite/gcc.target/riscv/sat/sat_s_sub-1-i64.c
index c0d643d710f..929de162d57 100644
--- a/gcc/testsuite/gcc.target/riscv/sat/sat_s_sub-1-i64.c
+++ b/gcc/testsuite/gcc.target/riscv/sat/sat_s_sub-1-i64.c
@@ -15,7 +15,7 @@
 ** li\s+[atx][0-9]+,\s*-1
 ** srli\s+[atx][0-9]+,\s*[atx][0-9]+,\s*1
 ** xor\s+[atx][0-9]+,\s*[atx][0-9]+,\s*[atx][0-9]+
-** neg\s+[atx][0-9]+,\s*[atx][0-9]+
+** srai\s+[atx][0-9]+,\s*[atx][0-9]+,\s*63
 ** and\s+[atx][0-9]+,\s*[atx][0-9]+,\s*[atx][0-9]+
 ** addi\s+[atx][0-9]+,\s*[atx][0-9]+,\s*-1
 ** and\s+[atx][0-9]+,\s*[atx][0-9]+,\s*[atx][0-9]+
diff --git a/gcc/testsuite/gcc.target/riscv/sat/sat_s_sub-2-i64.c 
b/gcc/testsuite/gcc.target/riscv/sat/sat_s_sub-2-i64.c
index 470e6b7391b..a5401983e7d 100644
--- a/gcc/testsuite/gcc.target/riscv/sat/sat_s_sub-2-i64.c
+++ b/gcc/testsuite/gcc.target/riscv/sat/sat_s_sub-2-i64.c
@@ -15,7 +15,7 @@
 ** li\s+[atx][0-9]+,\s*-1
 ** srli\s+[atx][0-9]+,\s*[atx][0-9]+,\s*1
 ** xor\s+[atx][0-9]+,\s*[atx][0-9]+,\s*[atx][0-9]+
-** neg\s+[atx][0-9]+,\s*[atx][0-9]+
+** srai\s+[atx][0-9]+,\s*[atx][0-9]+,\s*63
 ** and\s+[atx][0-9]+,\s*[atx][0-9]+,\s*[atx][0-9]+
 ** addi\s+[atx][0-9]+,\s*[atx][0-9]+,\s*-1
 ** and\s+[atx][0-9]+,\s*[atx][0-9]+,\s*[atx][0-9]+
diff --git a/gcc/testsuite/gcc.target/riscv/sat/sat_s_sub-3-i64.c 
b/gcc/testsuite/gcc.target/riscv/sat/sat_s_sub-3-i64.c
index bb947751fda..e3fe6c78ca6 100644
--- a/gcc/testsuite/gcc.target/riscv/sat/sat_s_sub-3-i64.c
+++ b/gcc/testsuite/gcc.target/riscv/sat/sat_s_sub-3-i64.c
@@ -15,7 +15,7 @@
 ** li\s+[atx][0-9]+,\s*-1
 ** srli\s+[atx][0-9]+,\s*[atx][0-9]+,\s*1
 ** xor\s+[atx][0-9]+,\s*[atx][0-9]+,\s*[atx][0-9]+
-** neg\s+[atx][0-9]+,\s*[atx][0-9]+
+** srai\s+[atx][0-9]+,\s*[atx][0-9]+,\s*63
 ** and\s+[atx][0-9]+,\s*[atx][0-9]+,\s*[atx][0-9]+
 ** addi\s+[atx][0-9]+,\s*[atx][0-9]+,\s*-1
 ** and\s+[atx][0-9]+,\s*[atx][0-9]+,\s*[atx][0-9]+
diff --git a/gcc/testsuite/gcc.target/riscv/sat/sat_s_sub-4-i64.c 
b/gcc/testsuite/gcc.target/riscv/sat/sat_s_sub-4-i64.c
index cc598ebc0d2..f42ffea5f9f 100644
--- a/gcc/testsuite/gcc.target/riscv/sat/sat_s_sub-4-i64.c
+++ b/gcc/testsuite/gcc.target/riscv/sat/sat_s_sub-4-i64.c
@@ -15,7 +15,7 @@
 ** li\s+[atx][0-9]+,\s*-1
 ** srli\s+[atx][0-9]+,\s*[atx][0-9]+,\s*1
 ** xor\s+[atx][0-9]+,\s*[atx][0-9]+,\s*[atx][0-9]+
-** neg\s+[atx][0-9]+,\s*[atx][0-9]+
+** srai\s+[atx][0-9]+,\s*[atx][0-9]+,\s*63
 ** and\s+[atx][0-9]+,\s*[atx][0-9]+,\s*[atx][0-9]+
 ** addi\s+[atx][0-9]+,\s*[atx][0-9]+,\s*-1
 ** and\s+[atx][0-9]+,\s*[atx][0-9]+,\s*[atx][0-9]+

Reply via email to