public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/aoliva/heads/testme)] [rs6000] Correct match pattern in pr56605.c
@ 2023-03-25 14:53 Alexandre Oliva
  0 siblings, 0 replies; 3+ messages in thread
From: Alexandre Oliva @ 2023-03-25 14:53 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:bb11304c7b2343f86e706b4f7136b9eb013ac305

commit bb11304c7b2343f86e706b4f7136b9eb013ac305
Author: Haochen Gui <guihaoc@linux.ibm.com>
Date:   Fri Mar 24 02:57:14 2023 -0300

    [rs6000] Correct match pattern in pr56605.c
    
    This patch corrects the match pattern in pr56605.c. The former pattern
    is wrong and test case fails with GCC11. It should match following
    insn on each subtarget after mode promotion is disabled. The patch
    need to be backported to GCC11.
    
    //gimple
    _17 = (unsigned int) _20;
     prolog_loop_niters.4_23 = _17 & 3;
    
    //rtl
    (insn 19 18 20 2 (parallel [
                (set (reg:CC 208)
                    (compare:CC (and:SI (subreg:SI (reg:DI 207) 0)
                            (const_int 3 [0x3]))
                        (const_int 0 [0])))
                (set (reg:SI 129 [ prolog_loop_niters.5 ])
                    (and:SI (subreg:SI (reg:DI 207) 0)
                        (const_int 3 [0x3])))
            ]) 197 {*andsi3_imm_mask_dot2}
    
    
    for  gcc/testsuite/ChangeLog
    
            PR target/102146
            * gcc.target/powerpc/pr56605.c: Correct match pattern in
            combine pass.

Diff:
---
 gcc/testsuite/gcc.target/powerpc/pr56605.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/gcc/testsuite/gcc.target/powerpc/pr56605.c b/gcc/testsuite/gcc.target/powerpc/pr56605.c
index 7695f87db6f..651a88e3cc7 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr56605.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr56605.c
@@ -11,5 +11,4 @@ void foo (short* __restrict sb, int* __restrict ia)
     ia[i] = (int) sb[i];
 }
 
-/* { dg-final { scan-rtl-dump-times {\(compare:CC \((?:and|zero_extend):(?:[SD]I) \((?:sub)?reg:[SD]I} 1 "combine" } } */
-
+/* { dg-final { scan-rtl-dump-times {\(compare:CC \(and:SI \(subreg:SI \(reg:DI} 1 "combine" } } */

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [gcc(refs/users/aoliva/heads/testme)] [rs6000] Correct match pattern in pr56605.c
@ 2023-03-30 14:08 Alexandre Oliva
  0 siblings, 0 replies; 3+ messages in thread
From: Alexandre Oliva @ 2023-03-30 14:08 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:52214f08d1f6f9b0e14bcff43ab697daa98a1cd1

commit 52214f08d1f6f9b0e14bcff43ab697daa98a1cd1
Author: Haochen Gui <guihaoc@linux.ibm.com>
Date:   Thu Mar 30 05:07:25 2023 -0300

    [rs6000] Correct match pattern in pr56605.c
    
    This patch corrects the match pattern in pr56605.c. The former pattern
    is wrong and test case fails with GCC11. It should match following
    insn on each subtarget after mode promotion is disabled. The patch
    need to be backported to GCC11.
    
    //gimple
    _17 = (unsigned int) _20;
     prolog_loop_niters.4_23 = _17 & 3;
    
    //rtl
    (insn 19 18 20 2 (parallel [
                (set (reg:CC 208)
                    (compare:CC (and:SI (subreg:SI (reg:DI 207) 0)
                            (const_int 3 [0x3]))
                        (const_int 0 [0])))
                (set (reg:SI 129 [ prolog_loop_niters.5 ])
                    (and:SI (subreg:SI (reg:DI 207) 0)
                        (const_int 3 [0x3])))
            ]) 197 {*andsi3_imm_mask_dot2}
    
    
    for  gcc/testsuite/ChangeLog
    
            PR target/102146
            * gcc.target/powerpc/pr56605.c: Correct match pattern in
            combine pass.

Diff:
---
 gcc/testsuite/gcc.target/powerpc/pr56605.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/gcc/testsuite/gcc.target/powerpc/pr56605.c b/gcc/testsuite/gcc.target/powerpc/pr56605.c
index 7695f87db6f..651a88e3cc7 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr56605.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr56605.c
@@ -11,5 +11,4 @@ void foo (short* __restrict sb, int* __restrict ia)
     ia[i] = (int) sb[i];
 }
 
-/* { dg-final { scan-rtl-dump-times {\(compare:CC \((?:and|zero_extend):(?:[SD]I) \((?:sub)?reg:[SD]I} 1 "combine" } } */
-
+/* { dg-final { scan-rtl-dump-times {\(compare:CC \(and:SI \(subreg:SI \(reg:DI} 1 "combine" } } */

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [gcc(refs/users/aoliva/heads/testme)] [rs6000] Correct match pattern in pr56605.c
@ 2023-03-24  6:25 Alexandre Oliva
  0 siblings, 0 replies; 3+ messages in thread
From: Alexandre Oliva @ 2023-03-24  6:25 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:6a8c54e7d90e0e38f371f6b4f8ddf3200a92d12d

commit 6a8c54e7d90e0e38f371f6b4f8ddf3200a92d12d
Author: Haochen Gui <guihaoc@linux.ibm.com>
Date:   Fri Mar 24 02:57:14 2023 -0300

    [rs6000] Correct match pattern in pr56605.c
    
    This patch corrects the match pattern in pr56605.c. The former pattern
    is wrong and test case fails with GCC11. It should match following
    insn on each subtarget after mode promotion is disabled. The patch
    need to be backported to GCC11.
    
    //gimple
    _17 = (unsigned int) _20;
     prolog_loop_niters.4_23 = _17 & 3;
    
    //rtl
    (insn 19 18 20 2 (parallel [
                (set (reg:CC 208)
                    (compare:CC (and:SI (subreg:SI (reg:DI 207) 0)
                            (const_int 3 [0x3]))
                        (const_int 0 [0])))
                (set (reg:SI 129 [ prolog_loop_niters.5 ])
                    (and:SI (subreg:SI (reg:DI 207) 0)
                        (const_int 3 [0x3])))
            ]) 197 {*andsi3_imm_mask_dot2}
    
    
    for  gcc/testsuite/ChangeLog
    
            PR target/102146
            * gcc.target/powerpc/pr56605.c: Correct match pattern in
            combine pass.

Diff:
---
 gcc/testsuite/gcc.target/powerpc/pr56605.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/gcc/testsuite/gcc.target/powerpc/pr56605.c b/gcc/testsuite/gcc.target/powerpc/pr56605.c
index 7695f87db6f..651a88e3cc7 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr56605.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr56605.c
@@ -11,5 +11,4 @@ void foo (short* __restrict sb, int* __restrict ia)
     ia[i] = (int) sb[i];
 }
 
-/* { dg-final { scan-rtl-dump-times {\(compare:CC \((?:and|zero_extend):(?:[SD]I) \((?:sub)?reg:[SD]I} 1 "combine" } } */
-
+/* { dg-final { scan-rtl-dump-times {\(compare:CC \(and:SI \(subreg:SI \(reg:DI} 1 "combine" } } */

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-03-30 14:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-25 14:53 [gcc(refs/users/aoliva/heads/testme)] [rs6000] Correct match pattern in pr56605.c Alexandre Oliva
  -- strict thread matches above, loose matches on Subject: below --
2023-03-30 14:08 Alexandre Oliva
2023-03-24  6:25 Alexandre Oliva

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).