[Bug tree-optimization/108888] [13 Regression] error: definition in block 26 follows the use

2023-04-11 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10

--- Comment #7 from CVS Commits  ---
The master branch has been updated by Andre Simoes Dias Vieira
:

https://gcc.gnu.org/g:58c8c1b383bc3c286d6527fc6e8fb62463f9a877

commit r13-7135-g58c8c1b383bc3c286d6527fc6e8fb62463f9a877
Author: Andre Vieira 
Date:   Tue Apr 11 10:07:43 2023 +0100

if-conv: Restore MASK_CALL conversion [PR10]

The original patch to fix this PR broke the if-conversion of calls into
IFN_MASK_CALL.  This patch restores that original behaviour and makes sure
the
tests added earlier specifically test inbranch SIMD clones.

gcc/ChangeLog:

PR tree-optimization/10
* tree-if-conv.cc (predicate_statements): Fix gimple call check.

gcc/testsuite/ChangeLog:

* gcc.dg/vect/vect-simd-clone-16.c: Make simd clone inbranch only.
* gcc.dg/vect/vect-simd-clone-17.c: Likewise.
* gcc.dg/vect/vect-simd-clone-18.c: Likewise.

[Bug tree-optimization/108888] [13 Regression] error: definition in block 26 follows the use

2023-04-03 Thread avieira at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10

avieira at gcc dot gnu.org changed:

   What|Removed |Added

 CC||avieira at gcc dot gnu.org

--- Comment #6 from avieira at gcc dot gnu.org ---
After this patch Andrew Stubbs patch
(https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=3da77f217c8b2089ecba3eb201e727c3fcdcd19d)
to use in-branch simd-clones for cases like in
gcc/testsuite/gcc.dg/vect/vect-simd-clone-16.c no longer work.

I believe this is because this patch changes the 'if (gimple_call ..)' into a
else 'if (...is_gimple_call (stmt))' which doesn't work because stmt will be 0
(it's a dyn_cast of gassign).

I'm testing a patch locally to fix this.

[Bug tree-optimization/108888] [13 Regression] error: definition in block 26 follows the use

2023-02-23 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10

Andrew Pinski  changed:

   What|Removed |Added

 CC||seurer at gcc dot gnu.org

--- Comment #5 from Andrew Pinski  ---
*** Bug 108908 has been marked as a duplicate of this bug. ***

[Bug tree-optimization/108888] [13 Regression] error: definition in block 26 follows the use

2023-02-23 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #4 from Richard Biener  ---
Fixed.

[Bug tree-optimization/108888] [13 Regression] error: definition in block 26 follows the use

2023-02-23 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10

--- Comment #3 from CVS Commits  ---
The master branch has been updated by Richard Biener :

https://gcc.gnu.org/g:31cc5821223a096ef61743bff520f4a0dbba5872

commit r13-6296-g31cc5821223a096ef61743bff520f4a0dbba5872
Author: Richard Biener 
Date:   Thu Feb 23 11:03:03 2023 +0100

tree-optimization/10 - call if-conversion

The following makes sure to only predicate calls necessary.

PR tree-optimization/10
* tree-if-conv.cc (if_convertible_stmt_p): Set PLF_2 on
calls to predicate.
(predicate_statements): Only predicate calls with PLF_2.

* g++.dg/torture/pr10.C: New testcase.

[Bug tree-optimization/108888] [13 Regression] error: definition in block 26 follows the use

2023-02-23 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10

Richard Biener  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|ams at gcc dot gnu.org |rguenth at gcc dot 
gnu.org

--- Comment #2 from Richard Biener  ---
Created attachment 54513
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54513=edit
patch

The issue is that need_to_predicate is not set and thus we do

  /* Insert the predicate of the BB at the end of the BB
 as this would reduce the register pressure: the only
 use of this predicate will be in successor BBs.  */

we only get to rewrite the call because need_to_rewrite_undefined.  So
maybe we don't need to predicate this call at all?

Using GF_PLF_2 to mark predicated calls would be appropriate for example.

I'm testing the attached.

[Bug tree-optimization/108888] [13 Regression] error: definition in block 26 follows the use

2023-02-22 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10

Marek Polacek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2023-02-22
 Ever confirmed|0   |1