* [PATCH] Fix gcc.dg/tree-ssa/reassoc-19.c testcase
@ 2012-12-18 13:26 Richard Biener
0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2012-12-18 13:26 UTC (permalink / raw)
To: gcc-patches
Revisiting PR40815, in particular the attached supposedly bad dump
shows:
D.2021_14 = (unsigned int) rite_2;
D.2022_9 = (unsigned int) element_5(D);
D.2023_15 = -D.2022_9;
D.2024_16 = D.2021_14 + D.2023_15;
rite_17 = (char *) D.2024_16;
while now we have
_7 = (sizetype) element_6(D);
_8 = -_7;
rite_9 = rite_1 + _8;
which TER will happily forward into the POINTER_PLUS_EXPR.
Thus the following adjusts the dump-scanning to expect exactly
that simplified form.
Tested on x86_64-unknown-linux-gnu, applied.
Richard.
2012-12-18 Richard Biener <rguenther@suse.de>
* gcc.dg/tree-ssa/reassoc-19.c: Adjust.
Index: gcc/testsuite/gcc.dg/tree-ssa/reassoc-19.c
===================================================================
--- gcc/testsuite/gcc.dg/tree-ssa/reassoc-19.c (revision 194578)
+++ gcc/testsuite/gcc.dg/tree-ssa/reassoc-19.c (working copy)
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-Os -fdump-tree-reassoc2" } */
+/* { dg-options "-Os -fdump-tree-optimized" } */
/* Slightly changed testcase from PR middle-end/40815. */
void bar(char*, char*, int);
@@ -8,14 +8,15 @@ void foo(char* left, char* rite, int ele
while (left <= rite)
{
/* This should expand into
- D.zzzz = D.zzzz - D.xxxx;
- and NOT to
- D.D.yyyy = -D.xxxx; D.zzzz = D.zzzz + D.yyyy; */
+ _7 = (sizetype) element_6(D);
+ _8 = -_7;
+ rite_9 = rite_1 + _8; */
rite -= element;
bar(left, rite, element);
}
}
-/* There should be no " + " in the dump. */
-/* { dg-final { scan-tree-dump-times " \\\+ " 0 "reassoc2" } } */
-/* { dg-final { cleanup-tree-dump "reassoc2" } } */
+/* { dg-final { scan-tree-dump-times "= \\\(sizetype\\\) element" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "= -" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times " \\\+ " 1 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-12-18 13:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-18 13:26 [PATCH] Fix gcc.dg/tree-ssa/reassoc-19.c testcase 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).