public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/66823] New: -ftree-loop-if-convert-stores miscompiles gfortran.dg/elemental_optional_args_3.f90
@ 2015-07-09 12:09 rguenth at gcc dot gnu.org
  2015-07-09 12:12 ` [Bug tree-optimization/66823] " rguenth at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-07-09 12:09 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66823

            Bug ID: 66823
           Summary: -ftree-loop-if-convert-stores miscompiles
                    gfortran.dg/elemental_optional_args_3.f90
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---
            Target: i?86-*-*

On x86_64 with -m32/-ftree-loop-if-convert-stores I see

FAIL: gfortran.dg/elemental_optional_args_3.f90   -O3 -fomit-frame-pointer 
execution test
FAIL: gfortran.dg/elemental_optional_args_3.f90   -O3 -fomit-frame-pointer
-funroll-loops  execution test
FAIL: gfortran.dg/elemental_optional_args_3.f90   -O3 -fomit-frame-pointer
-funroll-all-loops -finline-functions  execution test
FAIL: gfortran.dg/elemental_optional_args_3.f90   -O3 -g  execution test

if-conversion changes

 if (p != 0)
  val = *p;
 else
  val = 1;

to

 tem = *p;
 val = p != 0 ? tem : 1;


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

* [Bug tree-optimization/66823] -ftree-loop-if-convert-stores miscompiles gfortran.dg/elemental_optional_args_3.f90
  2015-07-09 12:09 [Bug tree-optimization/66823] New: -ftree-loop-if-convert-stores miscompiles gfortran.dg/elemental_optional_args_3.f90 rguenth at gcc dot gnu.org
@ 2015-07-09 12:12 ` rguenth at gcc dot gnu.org
  2015-07-09 12:13 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-07-09 12:12 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66823

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
And with -m64/-ftree-loop-if-convert-stores

FAIL: gcc.c-torture/execute/pr51933.c   -O1  execution test
FAIL: gcc.c-torture/execute/pr51933.c   -O2  execution test
FAIL: gcc.c-torture/execute/pr51933.c   -O3 -fomit-frame-pointer  execution
test
FAIL: gcc.c-torture/execute/pr51933.c   -O3 -fomit-frame-pointer -funroll-loops
 execution test
FAIL: gcc.c-torture/execute/pr51933.c   -O3 -fomit-frame-pointer
-funroll-all-loops -finline-functions  execution test
FAIL: gcc.c-torture/execute/pr51933.c   -O3 -g  execution test
FAIL: gcc.c-torture/execute/pr51933.c   -O2 -flto -fno-use-linker-plugin
-flto-partition=none  execution test
FAIL: gcc.c-torture/execute/pr51933.c   -O2 -flto -fuse-linker-plugin
-fno-fat-lto-objects  execution test


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

* [Bug tree-optimization/66823] -ftree-loop-if-convert-stores miscompiles gfortran.dg/elemental_optional_args_3.f90
  2015-07-09 12:09 [Bug tree-optimization/66823] New: -ftree-loop-if-convert-stores miscompiles gfortran.dg/elemental_optional_args_3.f90 rguenth at gcc dot gnu.org
  2015-07-09 12:12 ` [Bug tree-optimization/66823] " rguenth at gcc dot gnu.org
@ 2015-07-09 12:13 ` rguenth at gcc dot gnu.org
  2015-07-09 12:52 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-07-09 12:13 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66823

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Created attachment 35943
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35943&action=edit
patch triggering fails without -ftree-loop-if-convert-stores

Discovered while testing attached patch to improve if-conversion of loads


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

* [Bug tree-optimization/66823] -ftree-loop-if-convert-stores miscompiles gfortran.dg/elemental_optional_args_3.f90
  2015-07-09 12:09 [Bug tree-optimization/66823] New: -ftree-loop-if-convert-stores miscompiles gfortran.dg/elemental_optional_args_3.f90 rguenth at gcc dot gnu.org
  2015-07-09 12:12 ` [Bug tree-optimization/66823] " rguenth at gcc dot gnu.org
  2015-07-09 12:13 ` rguenth at gcc dot gnu.org
@ 2015-07-09 12:52 ` rguenth at gcc dot gnu.org
  2015-07-10  7:53 ` rguenth at gcc dot gnu.org
  2015-07-10 12:34 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-07-09 12:52 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66823

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2015-07-09
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Index: gcc/tree-if-conv.c
===================================================================
--- gcc/tree-if-conv.c  (revision 225610)
+++ gcc/tree-if-conv.c  (working copy)
@@ -642,7 +642,7 @@ memrefs_read_or_written_unconditionally
                    || TREE_CODE (ref_base_b) == REALPART_EXPR)
               ref_base_b = TREE_OPERAND (ref_base_b, 0);

-           if (!operand_equal_p (ref_base_a, ref_base_b, 0))
+           if (operand_equal_p (ref_base_a, ref_base_b, 0))
              {
                tree cb = bb_predicate (gimple_bb (DR_STMT (b)));


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

* [Bug tree-optimization/66823] -ftree-loop-if-convert-stores miscompiles gfortran.dg/elemental_optional_args_3.f90
  2015-07-09 12:09 [Bug tree-optimization/66823] New: -ftree-loop-if-convert-stores miscompiles gfortran.dg/elemental_optional_args_3.f90 rguenth at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2015-07-09 12:52 ` rguenth at gcc dot gnu.org
@ 2015-07-10  7:53 ` rguenth at gcc dot gnu.org
  2015-07-10 12:34 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-07-10  7:53 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66823

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Fri Jul 10 07:53:06 2015
New Revision: 225652

URL: https://gcc.gnu.org/viewcvs?rev=225652&root=gcc&view=rev
Log:
2015-07-10  Richard Biener  <rguenther@suse.de>

        PR tree-optimization/66823
        * tree-if-conv.c (memrefs_read_or_written_unconditionally): Fix
        inverted predicate.

        * gcc.dg/vect/pr61194.c: Remove -ftree-loop-if-convert-stores
        which should not be necessary.  XFAIL.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/vect/pr61194.c
    trunk/gcc/tree-if-conv.c


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

* [Bug tree-optimization/66823] -ftree-loop-if-convert-stores miscompiles gfortran.dg/elemental_optional_args_3.f90
  2015-07-09 12:09 [Bug tree-optimization/66823] New: -ftree-loop-if-convert-stores miscompiles gfortran.dg/elemental_optional_args_3.f90 rguenth at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2015-07-10  7:53 ` rguenth at gcc dot gnu.org
@ 2015-07-10 12:34 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-07-10 12:34 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66823

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Fri Jul 10 12:33:28 2015
New Revision: 225671

URL: https://gcc.gnu.org/viewcvs?rev=225671&root=gcc&view=rev
Log:
2015-07-10  Richard Biener  <rguenther@suse.de>

        Backport from mainline
        2015-07-10  Richard Biener  <rguenther@suse.de>

        PR tree-optimization/66823
        * tree-if-conv.c (memrefs_read_or_written_unconditionally): Fix
        inverted predicate.

        * gcc.dg/vect/pr61194.c: Remove -ftree-loop-if-convert-stores
        which should not be necessary.  XFAIL.

        2015-07-08  Richard Biener  <rguenther@suse.de>

        PR middle-end/43341
        * toplev.c (compile_file): Reset maximum_field_alignment after parsing.

        2015-07-08  Richard Biener  <rguenther@suse.de>

        PR tree-optimization/66794
        * gimple-ssa-isolate-paths.c (gimple_ssa_isolate_erroneous_paths):
        Free post-dominators.

        * gcc.dg/torture/pr66794.c: New testcase.

Added:
    branches/gcc-5-branch/gcc/testsuite/gcc.dg/torture/pr66794.c
Modified:
    branches/gcc-5-branch/gcc/ChangeLog
    branches/gcc-5-branch/gcc/gimple-ssa-isolate-paths.c
    branches/gcc-5-branch/gcc/testsuite/ChangeLog
    branches/gcc-5-branch/gcc/testsuite/gcc.dg/vect/pr61194.c
    branches/gcc-5-branch/gcc/toplev.c
    branches/gcc-5-branch/gcc/tree-if-conv.c


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

end of thread, other threads:[~2015-07-10 12:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-09 12:09 [Bug tree-optimization/66823] New: -ftree-loop-if-convert-stores miscompiles gfortran.dg/elemental_optional_args_3.f90 rguenth at gcc dot gnu.org
2015-07-09 12:12 ` [Bug tree-optimization/66823] " rguenth at gcc dot gnu.org
2015-07-09 12:13 ` rguenth at gcc dot gnu.org
2015-07-09 12:52 ` rguenth at gcc dot gnu.org
2015-07-10  7:53 ` rguenth at gcc dot gnu.org
2015-07-10 12:34 ` rguenth at gcc dot gnu.org

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