Bug 38219 - gcc.dg/tree-ssa/vrp47.c fails on m68k
Summary: gcc.dg/tree-ssa/vrp47.c fails on m68k
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.4.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: missed-optimization
: 51942 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-11-21 17:15 UTC by Jack Howarth
Modified: 2021-07-29 01:06 UTC (History)
11 users (show)

See Also:
Host:
Target: m68k-*-linux-gnu, powerpc*-*-*
Build:
Known to work:
Known to fail:
Last reconfirmed: 2016-01-29 00:00:00


Attachments
assembly file for gcc.dg/tree-ssa/vrp47.c on powerpc-apple-darwin9 (208 bytes, text/plain)
2008-11-21 17:16 UTC, Jack Howarth
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jack Howarth 2008-11-21 17:15:13 UTC
The gcc.dg/tree-ssa/vrp47.c test case fails on powerpc apple darwin as follows...

Executing on host: /sw/src/fink.build/gcc44-4.3.999-20081120/darwin_objdir/gcc/xgcc -B/sw/src/fink.build/gcc44-4.3.999-20081120/darwin_objdir/gcc/ /sw/src/fink.build/gcc44-4.3.999-20081120/gcc-4.4-20081120/gcc/testsuite/gcc.dg/tree-ssa/vrp47.c   -O2 -fdump-tree-vrp -fdump-tree-dom -S  -o vrp47.s    (timeout = 300)
PASS: gcc.dg/tree-ssa/vrp47.c (test for excess errors)
FAIL: gcc.dg/tree-ssa/vrp47.c scan-tree-dump-times vrp1 "[xy][^ ]* !=" 0
FAIL: gcc.dg/tree-ssa/vrp47.c scan-tree-dump-times dom1 "x[^ ]* & y" 1
XFAIL: gcc.dg/tree-ssa/vrp47.c scan-tree-dump-times vrp1 "x[^ ]* & y" 1
PASS: gcc.dg/tree-ssa/vrp47.c scan-tree-dump-times vrp1 "x[^ ]* [|] y" 1
PASS: gcc.dg/tree-ssa/vrp47.c scan-tree-dump-times vrp1 "x[^ ]* \^ 1" 1
Comment 1 Jack Howarth 2008-11-21 17:16:48 UTC
Created attachment 16741 [details]
assembly file for  gcc.dg/tree-ssa/vrp47.c on powerpc-apple-darwin9
Comment 2 Andrew Pinski 2008-11-23 18:44:32 UTC
The patch which introduced this testcase:
http://gcc.gnu.org/ml/gcc-patches/2008-08/msg01925.html

I thought I reported this failure to Paolo but I can't find the email.
Comment 3 Janis Johnson 2008-12-02 00:05:43 UTC
This test also fails on powerpc64-unknown-linux-gnu for both -m32 and -m64.
Comment 4 Janis Johnson 2009-01-20 00:22:46 UTC
See the analysis in http://gcc.gnu.org/ml/gcc-patches/2009-01/msg00801.html which skips the test for MIPS targets.
Comment 5 Jack Howarth 2009-02-21 01:25:35 UTC
So should we have...

Index: gcc/testsuite/gcc.dg/tree-ssa/vrp47.c
===================================================================
--- gcc/testsuite/gcc.dg/tree-ssa/vrp47.c	(revision 144342)
+++ gcc/testsuite/gcc.dg/tree-ssa/vrp47.c	(working copy)
@@ -30,10 +30,10 @@
 
 /* Test that x and y are never compared to 0 -- they're always known to be
    0 or 1.  */
-/* { dg-final { scan-tree-dump-times "\[xy\]\[^ \]* !=" 0 "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "\[xy\]\[^ \]* !=" 0 "vrp1" { xfail powerpc*-*-* } } } */
 
 /* This one needs more copy propagation that only happens in dom1.  */
-/* { dg-final { scan-tree-dump-times "x\[^ \]* & y" 1 "dom1" } } */
+/* { dg-final { scan-tree-dump-times "x\[^ \]* & y" 1 "dom1" { xfail powerpc*-*-* } } } */
 /* { dg-final { scan-tree-dump-times "x\[^ \]* & y" 1 "vrp1" { xfail *-*-* } } } */
 
 /* These two are fully simplified by VRP.  */

Comment 6 Paolo Bonzini 2009-02-21 07:28:44 UTC
Subject: Re:  gcc.dg/tree-ssa/vrp47.c fails on powerpc

I'd rather do so only on the branch when it is created.  I'm pretty
sure this can be fixed, but it's probably not stage4 stuff.
Comment 7 Gerald Pfeifer 2009-03-01 19:26:52 UTC
I'm seeing the same on i386-unknown-freebsd7.1.  

PASS: gcc.dg/tree-ssa/vrp47.c (test for excess errors)
FAIL: gcc.dg/tree-ssa/vrp47.c scan-tree-dump-times vrp1 "[xy][^ ]* !=" 0
FAIL: gcc.dg/tree-ssa/vrp47.c scan-tree-dump-times dom1 "x[^ ]* & y" 1
XFAIL: gcc.dg/tree-ssa/vrp47.c scan-tree-dump-times vrp1 "x[^ ]* & y" 1
FAIL: gcc.dg/tree-ssa/vrp47.c scan-tree-dump-times vrp1 "x[^ ]* [|] y" 1
PASS: gcc.dg/tree-ssa/vrp47.c scan-tree-dump-times vrp1 "x[^ ]* \^ 1" 1

Is this the same issue, or should I open a different report?
Comment 8 Paolo Bonzini 2009-03-02 06:11:38 UTC
Subject: Re:  gcc.dg/tree-ssa/vrp47.c fails on powerpc

> Is this the same issue, or should I open a different report?

I think it is the same, I will verify.
Comment 9 John David Anglin 2009-08-02 02:29:43 UTC
See the same on hppa1.1-hp-hpux10.20 but not on hppa2.0w-hp-hpux11.11:
http://gcc.gnu.org/ml/gcc-testresults/2009-08/msg00185.html
Comment 10 Pat Haugen 2010-07-14 19:21:19 UTC
Any new activity here? Still failing on powerpc.
Comment 11 John David Anglin 2011-02-21 15:51:59 UTC
Still fails on hppa1.1-hp-hpux10.20 with 4.6.0 revision 170207.
Comment 12 Mikael Pettersson 2011-02-27 16:17:50 UTC
Fails on m68k-linux too, with gcc-4.4.5, 4.5.2, and 4.6-20110219.
Comment 13 Sean McGovern 2011-11-17 15:49:33 UTC
Confirming that this also still fails on i386-pc-solaris2.10.

Should probably change the bug title and the target as it fails on more than just powerpc.
Comment 14 Andrew Pinski 2012-01-26 01:02:35 UTC
*** Bug 51942 has been marked as a duplicate of this bug. ***
Comment 15 Sean McGovern 2012-05-15 17:00:25 UTC
As of 186222, no longer seems to fail on i386-pc-solaris2.10
Comment 17 Pat Haugen 2014-07-10 19:34:35 UTC
This test no longer fails on powerpc after my patch to make powerpc*-*-* a logical_op_short_circuit target (https://gcc.gnu.org/ml/gcc-patches/2014-07/msg00637.html).

Searching the test-results, looks like m68k is the only other target where it's still failing(https://gcc.gnu.org/ml/gcc-testresults/2014-07/msg00700.html). More than likely for the same reason since it looks like that target doesn't define LOGICAL_OP_NON_SHORT_CIRCUIT or BRANCH_COST, which means it should default to false.
Comment 18 Martin Sebor 2016-01-30 02:08:01 UTC
For powerpc, I only see the failures in 4.8.5 and 4.9.{3,4} results:
/home/msebor/Documents/GCC/testresults/2016-01/msg02767.html

They are present in m68k-unknown-linux-gnu results for 6.0 so I added it to the list of targets:
/home/msebor/Documents/GCC/testresults/2016-01/msg02733.html
Comment 19 Jeffrey A. Law 2016-11-17 23:55:19 UTC
Author: law
Date: Thu Nov 17 23:54:46 2016
New Revision: 242576

URL: https://gcc.gnu.org/viewcvs?rev=242576&root=gcc&view=rev
Log:
	PR middle-end/38219
	* gcc.dg/tree-ssa/vrp47.c: Do not run on m68k.

Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/tree-ssa/vrp47.c
Comment 20 Jeffrey A. Law 2016-11-17 23:58:15 UTC
Fixed on the trunk.