[Bug rtl-optimization/113903] sched1 should schedule across EBBS

2024-02-13 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113903

Andrew Pinski  changed:

   What|Removed |Added

   Severity|normal  |enhancement
 CC||pinskia at gcc dot gnu.org

[Bug rtl-optimization/113903] sched1 should schedule across EBBS

2024-02-13 Thread tnfchris at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113903

--- Comment #2 from Tamar Christina  ---
(In reply to Alexander Monakov from comment #1)
> Lifting those insns from the L8 BB to the L10 BB requires duplicating them
> on all incoming edges targeting L8, doesn't it?
> 

No, because they're unused before L10.  If they are used then they can't be
moved. (note that L10 is only reachable from L8 as it's a branch in the loop).

> Why is decreasing live ranges important here?

two reasons, first we have to avoid prematurely creating the copies.

The loop has multiple exits, and the values are not relevant for all exits.

mov z29.d, z31.d
mov z27.d, z30.d

is being done because we increment the inductions in the same basic block.  But
the incremented value is not needed in L8.

for loop induction variables I suppose we can change the materialization point
in the vectorizer to deal with them that way, but that only takes care of
inductions and ideally we shouldn't perform operations before an exit if it's
not needed for that exit.

At the moment the vectorizer only deals with moving statements that are needed
for correctness.

[Bug rtl-optimization/113903] sched1 should schedule across EBBS

2024-02-13 Thread amonakov at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113903

Alexander Monakov  changed:

   What|Removed |Added

 CC||amonakov at gcc dot gnu.org

--- Comment #1 from Alexander Monakov  ---
Lifting those insns from the L8 BB to the L10 BB requires duplicating them on
all incoming edges targeting L8, doesn't it?

Why is decreasing live ranges important here?