* [PATCH] Fix testcases to avoid plusminus-with-convert pattern (PR 97066)
@ 2020-09-16 8:53 Feng Xue OS
2020-09-16 12:18 ` Richard Biener
0 siblings, 1 reply; 2+ messages in thread
From: Feng Xue OS @ 2020-09-16 8:53 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 483 bytes --]
With the new pattern rule (T)(A) +- (T)(B) -> (T)(A +- B),
some testcases are simplified and could not keep expected
code pattern as test-check. Minor changes are made to those
cases to avoid simplification effect of the rule.
Tested on x86_64-linux and aarch64-linux.
Feng
---
2020-09-16 Feng Xue <fxue@os.amperecomputing.com>
gcc/testsuite/
PR testsuite/97066
* gcc.dg/ifcvt-3.c: Modified to suppress simplification.
* gcc.dg/tree-ssa/20030807-10.c: Likewise.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-testsuite-97066-minor-change-to-bypass-plusminus-wit.patch --]
[-- Type: text/x-patch; name="0001-testsuite-97066-minor-change-to-bypass-plusminus-wit.patch", Size: 1682 bytes --]
From ac768c385f1332e276260c6de83b12929180fbfb Mon Sep 17 00:00:00 2001
From: Feng Xue <fxue@os.amperecomputing.com>
Date: Wed, 16 Sep 2020 16:21:14 +0800
Subject: [PATCH] testsuite/97066 - minor change to bypass
plusminus-with-convert rule
The following testcases will be simplified by the new rule
(T)(A) +- (T)(B) -> (T)(A +- B), so could not keep expected code pattern
as test-check. Adjust test code to suppress simplification.
2020-09-16 Feng Xue <fxue@os.amperecomputing.com>
gcc/testsuite/
PR testsuite/97066
* gcc.dg/ifcvt-3.c: Modified to suppress simplification.
* gcc.dg/tree-ssa/20030807-10.c: Likewise.
---
gcc/testsuite/gcc.dg/ifcvt-3.c | 2 +-
gcc/testsuite/gcc.dg/tree-ssa/20030807-10.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/testsuite/gcc.dg/ifcvt-3.c b/gcc/testsuite/gcc.dg/ifcvt-3.c
index b250bc15e08..56fdd753a0a 100644
--- a/gcc/testsuite/gcc.dg/ifcvt-3.c
+++ b/gcc/testsuite/gcc.dg/ifcvt-3.c
@@ -11,7 +11,7 @@ foo (s64 a, s64 b, s64 c)
if (d == 0)
return a + c;
else
- return b + d + c;
+ return b + c + d;
}
/* This test can be reduced to just return a + c; */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030807-10.c b/gcc/testsuite/gcc.dg/tree-ssa/20030807-10.c
index 0903f3c4321..0e01e511b78 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/20030807-10.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/20030807-10.c
@@ -7,7 +7,7 @@ unsigned int
subreg_highpart_offset (outermode, innermode)
int outermode, innermode;
{
- unsigned int offset = 0;
+ unsigned int offset = 1;
int difference = (mode_size[innermode] - mode_size[outermode]);
if (difference > 0)
{
--
2.17.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Fix testcases to avoid plusminus-with-convert pattern (PR 97066)
2020-09-16 8:53 [PATCH] Fix testcases to avoid plusminus-with-convert pattern (PR 97066) Feng Xue OS
@ 2020-09-16 12:18 ` Richard Biener
0 siblings, 0 replies; 2+ messages in thread
From: Richard Biener @ 2020-09-16 12:18 UTC (permalink / raw)
To: Feng Xue OS; +Cc: gcc-patches
On Wed, Sep 16, 2020 at 10:54 AM Feng Xue OS via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> With the new pattern rule (T)(A) +- (T)(B) -> (T)(A +- B),
> some testcases are simplified and could not keep expected
> code pattern as test-check. Minor changes are made to those
> cases to avoid simplification effect of the rule.
>
> Tested on x86_64-linux and aarch64-linux.
OK.
> Feng
> ---
> 2020-09-16 Feng Xue <fxue@os.amperecomputing.com>
>
> gcc/testsuite/
> PR testsuite/97066
> * gcc.dg/ifcvt-3.c: Modified to suppress simplification.
> * gcc.dg/tree-ssa/20030807-10.c: Likewise.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-16 12:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-16 8:53 [PATCH] Fix testcases to avoid plusminus-with-convert pattern (PR 97066) Feng Xue OS
2020-09-16 12:18 ` Richard Biener
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).