public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: HAO CHEN GUI <guihaoc@linux.ibm.com>
To: "Kewen.Lin" <linkw@linux.ibm.com>, Alexandre Oliva <oliva@adacore.com>
Cc: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>,
	Mike Stump <mikestump@comcast.net>,
	David Edelsohn <dje.gcc@gmail.com>,
	Segher Boessenkool <segher@kernel.crashing.org>,
	Kewen Lin <linkw@gcc.gnu.org>,
	gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] [rs6000] Correct match pattern in pr56605.c
Date: Mon, 27 Mar 2023 17:46:52 +0800	[thread overview]
Message-ID: <6736aa23-bc18-38c3-17d4-c13c3ac2eadd@linux.ibm.com> (raw)
In-Reply-To: <004a8027-e7d0-9eb9-8798-576d37445d5f@linux.ibm.com>

Kewen,
  The case still fails with trunk.

FAIL: gcc.target/powerpc/pr56605.c scan-rtl-dump-times combine "\\(compare:CC \\((?:and|zero_extend):(?:[SD]I) \\((?:sub)?reg:[SD]I" 1

                === gcc Summary ===

# of expected passes            1
# of unexpected failures        1

  With the trunk, it should match the pattern.
(compare:CC (and:SI (subreg:SI (reg:DI 207) 0)

Thanks
Gui Haochen


在 2023/3/27 15:41, Kewen.Lin 写道:
> Hi Alexandre and Haochen,
> 
> on 2023/3/25 16:42, Alexandre Oliva via Gcc-patches wrote:
>>
>> Ping https://gcc.gnu.org/pipermail/gcc-patches/2022-February/590958.html
>>
>> From: Haochen Gui <guihaoc@linux.ibm.com>
>>
>> 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.
> 
> Comment https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102146#c21 made me
> feel that this test issue was just in branches, but this proposed patch
> seems to say it still exists on trunk, could you confirm that?
> 
> BR,
> Kewen
> 
>>
>> //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}
>>
>> Rebased.  Regstrapped on ppc64-linux-gnu.  Also tested with
>> ppc64-vxworks7r2 (gcc-12), where it's also needed.  Ok to install?
>>
>>
>> for  gcc/testsuite/ChangeLog
>>
>> 	PR target/102146
>> 	* gcc.target/powerpc/pr56605.c: Correct match pattern in
>> 	combine pass.
>> ---
>>  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 7695f87db6f66..651a88e3cc7f9 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" } } */
> 

  reply	other threads:[~2023-03-27  9:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-25  8:42 Alexandre Oliva
2023-03-27  7:41 ` Kewen.Lin
2023-03-27  9:46   ` HAO CHEN GUI [this message]
2023-03-27 10:25     ` Kewen.Lin
  -- strict thread matches above, loose matches on Subject: below --
2022-02-28  3:17 [PATCH, rs6000] " HAO CHEN GUI
2022-04-08 16:48 ` will schmidt
2022-04-11  2:47   ` HAO CHEN GUI
2022-04-12 17:23     ` Segher Boessenkool
2022-04-08 19:36 ` Segher Boessenkool
2022-04-11  5:26   ` HAO CHEN GUI

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=6736aa23-bc18-38c3-17d4-c13c3ac2eadd@linux.ibm.com \
    --to=guihaoc@linux.ibm.com \
    --cc=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=linkw@gcc.gnu.org \
    --cc=linkw@linux.ibm.com \
    --cc=mikestump@comcast.net \
    --cc=oliva@adacore.com \
    --cc=ro@CeBiTec.Uni-Bielefeld.DE \
    --cc=segher@kernel.crashing.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).