public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/47341] New: unnecessary versioning in the vectorizer.
@ 2011-01-18 11:40 Joost.VandeVondele at pci dot uzh.ch
2011-01-18 12:30 ` [Bug middle-end/47341] " rguenth at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: Joost.VandeVondele at pci dot uzh.ch @ 2011-01-18 11:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47341
Summary: unnecessary versioning in the vectorizer.
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: Joost.VandeVondele@pci.uzh.ch
with current trunk:
> cat test.f90
SUBROUTINE HARD_NN_4_4_4_5_1_2_4(C,A,B)
REAL(KIND=8) :: C(4,*)
REAL(KIND=8) :: B(4,*), A(4,*)
INTEGER ::i,j,l
l= 1
DO j= 1 , 4 , 2
DO i= 1 , 4 , 1
C(i+0,j+0)=C(i+0,j+0)+A(i+0,l+0)*B(l+0,j+0)
C(i+0,j+0)=C(i+0,j+0)+A(i+0,l+1)*B(l+1,j+0)
C(i+0,j+0)=C(i+0,j+0)+A(i+0,l+2)*B(l+2,j+0)
C(i+0,j+0)=C(i+0,j+0)+A(i+0,l+3)*B(l+3,j+0)
C(i+0,j+1)=C(i+0,j+1)+A(i+0,l+0)*B(l+0,j+1)
C(i+0,j+1)=C(i+0,j+1)+A(i+0,l+1)*B(l+1,j+1)
C(i+0,j+1)=C(i+0,j+1)+A(i+0,l+2)*B(l+2,j+1)
C(i+0,j+1)=C(i+0,j+1)+A(i+0,l+3)*B(l+3,j+1)
ENDDO
ENDDO
END SUBROUTINE
> gfortran-trunk -c -O2 -fno-unroll-loops -ftree-vectorize -ftree-vectorizer-verbose=1 -march=core2 -msse4.2 test.f90
test.f90:7: note: created 1 versioning for alias checks.
test.f90:7: note: LOOP VECTORIZED.
test.f90:1: note: vectorized 1 loops in function.
The compiler should not need to generate various version of these loops. With
the bounds info provided, nothing can alias (I think).
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/47341] unnecessary versioning in the vectorizer.
2011-01-18 11:40 [Bug middle-end/47341] New: unnecessary versioning in the vectorizer Joost.VandeVondele at pci dot uzh.ch
@ 2011-01-18 12:30 ` rguenth at gcc dot gnu.org
2011-01-18 12:52 ` mikael at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-01-18 12:30 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47341
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011.01.18 11:21:06
Ever Confirmed|0 |1
--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-01-18 11:21:06 UTC ---
t.f90:7: note: versioning for alias required: can't determine dependence
between *c_18(D)[D.1552_17] and *c_18(D)[D.1603_128]
pretmp.22_273 = (integer(kind=8)) j_2;
pretmp.22_274 = pretmp.22_273 * 4;
pretmp.30_287 = pretmp.22_273 + 1;
pretmp.30_288 = pretmp.30_287 * 4;
D.1548_13 = (integer(kind=8)) i_1;
D.1551_16 = D.1548_13 + pretmp.22_274;
D.1552_17 = D.1551_16 + -5;
D.1602_127 = D.1548_13 + pretmp.30_288;
D.1603_128 = D.1602_127 + -5;
thus we can't determine the dependence between
*(c_18(D) + (integer(kind=8)) i_1 + ((integer(kind=8)) j_2) * 4)
vs
*(c_18(D) + (integer(kind=8)) i_1 + (((integer(kind=8)) j_2) + 1) * 4)
(compute_affine_dependence
(stmt_a =
D.1553_19 = *c_18(D)[D.1552_17];
)
(stmt_b =
D.1604_129 = *c_18(D)[D.1603_128];
)
(subscript_dependence_tester
(analyze_overlapping_iterations
(chrec_a = {pretmp.22_274 + -4, +, 1}_2)
(chrec_b = {pretmp.30_288 + -4, +, 1}_2)
(analyze_siv_subscript
siv test failed: unimplemented.
)
the SCEVs cannot be expanded properly because of the casts.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/47341] unnecessary versioning in the vectorizer.
2011-01-18 11:40 [Bug middle-end/47341] New: unnecessary versioning in the vectorizer Joost.VandeVondele at pci dot uzh.ch
2011-01-18 12:30 ` [Bug middle-end/47341] " rguenth at gcc dot gnu.org
@ 2011-01-18 12:52 ` mikael at gcc dot gnu.org
2012-06-30 13:40 ` Joost.VandeVondele at mat dot ethz.ch
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: mikael at gcc dot gnu.org @ 2011-01-18 12:52 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47341
Mikael Morin <mikael at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mikael at gcc dot gnu.org
--- Comment #2 from Mikael Morin <mikael at gcc dot gnu.org> 2011-01-18 12:30:09 UTC ---
(In reply to comment #1)
> the SCEVs cannot be expanded properly because of the casts.
Doesn't seem to work better with i,j,l made integer(8), i.e. without the casts.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/47341] unnecessary versioning in the vectorizer.
2011-01-18 11:40 [Bug middle-end/47341] New: unnecessary versioning in the vectorizer Joost.VandeVondele at pci dot uzh.ch
2011-01-18 12:30 ` [Bug middle-end/47341] " rguenth at gcc dot gnu.org
2011-01-18 12:52 ` mikael at gcc dot gnu.org
@ 2012-06-30 13:40 ` Joost.VandeVondele at mat dot ethz.ch
2012-07-19 11:21 ` [Bug middle-end/47341] unnecessary versioning in the vectorizer, not implemented affine-affine test rguenth at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Joost.VandeVondele at mat dot ethz.ch @ 2012-06-30 13:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47341
Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2011-01-18 11:21:06 |2012-06-30 11:21:06
--- Comment #3 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> 2012-06-30 13:39:57 UTC ---
versioning still happens with 4.8
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/47341] unnecessary versioning in the vectorizer, not implemented affine-affine test
2011-01-18 11:40 [Bug middle-end/47341] New: unnecessary versioning in the vectorizer Joost.VandeVondele at pci dot uzh.ch
` (2 preceding siblings ...)
2012-06-30 13:40 ` Joost.VandeVondele at mat dot ethz.ch
@ 2012-07-19 11:21 ` rguenth at gcc dot gnu.org
2013-03-29 8:30 ` Joost.VandeVondele at mat dot ethz.ch
2021-12-22 8:44 ` [Bug tree-optimization/47341] " pinskia at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-07-19 11:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47341
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|unnecessary versioning in |unnecessary versioning in
|the vectorizer. |the vectorizer, not
| |implemented affine-affine
| |test
--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-07-19 11:21:01 UTC ---
can't determine dependence between *c_9(D)[D.1882_8] and *c_9(D)[D.1933_40]
pretmp.22_166 = (integer(kind=8)) j_2;
D.1880_6 = (integer(kind=8)) i_1;
pretmp.22_167 = pretmp.22_166 * 16; j * 16
D.1881_7 = D.1880_6 + pretmp.22_167;
D.1882_8 = D.1881_7 + -17;
pretmp.30_181 = pretmp.22_166 + 1;
pretmp.30_182 = pretmp.30_181 * 16; (j + 1) * 16
D.1932_39 = D.1880_6 + pretmp.30_182;
D.1933_40 = D.1932_39 + -17;
(compute_affine_dependence
stmt_a: D.1883_10 = *c_9(D)[D.1882_8];
stmt_b: D.1934_41 = *c_9(D)[D.1933_40];
(subscript_dependence_tester
(analyze_overlapping_iterations
(chrec_a = {{0, +, 32}_1, +, 1}_2)
(chrec_b = {{16, +, 32}_1, +, 1}_2)
(analyze_miv_subscript
(analyze_subscript_affine_affine
affine-affine test failed: unimplemented.
) -> dependence analysis failed
so we seem to be one step further ;) In fact we now hit the issue that
the fortran frontend presents us with lowered array accesses. We
see a one-dimensional access and do not consider the two indices to
be independent. In the above case though we know the number of iterations
of loop 2 and thus could see that there is never any overlap.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/47341] unnecessary versioning in the vectorizer, not implemented affine-affine test
2011-01-18 11:40 [Bug middle-end/47341] New: unnecessary versioning in the vectorizer Joost.VandeVondele at pci dot uzh.ch
` (3 preceding siblings ...)
2012-07-19 11:21 ` [Bug middle-end/47341] unnecessary versioning in the vectorizer, not implemented affine-affine test rguenth at gcc dot gnu.org
@ 2013-03-29 8:30 ` Joost.VandeVondele at mat dot ethz.ch
2021-12-22 8:44 ` [Bug tree-optimization/47341] " pinskia at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: Joost.VandeVondele at mat dot ethz.ch @ 2013-03-29 8:30 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47341
Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2012-06-30 11:21:06 |2013-03-29
CC| |Joost.VandeVondele at mat
| |dot ethz.ch
--- Comment #5 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> 2013-03-29 08:29:53 UTC ---
still versioning for trunk 4.9.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/47341] unnecessary versioning in the vectorizer, not implemented affine-affine test
2011-01-18 11:40 [Bug middle-end/47341] New: unnecessary versioning in the vectorizer Joost.VandeVondele at pci dot uzh.ch
` (4 preceding siblings ...)
2013-03-29 8:30 ` Joost.VandeVondele at mat dot ethz.ch
@ 2021-12-22 8:44 ` pinskia at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-22 8:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47341
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|middle-end |tree-optimization
Severity|normal |enhancement
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-12-22 8:44 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-18 11:40 [Bug middle-end/47341] New: unnecessary versioning in the vectorizer Joost.VandeVondele at pci dot uzh.ch
2011-01-18 12:30 ` [Bug middle-end/47341] " rguenth at gcc dot gnu.org
2011-01-18 12:52 ` mikael at gcc dot gnu.org
2012-06-30 13:40 ` Joost.VandeVondele at mat dot ethz.ch
2012-07-19 11:21 ` [Bug middle-end/47341] unnecessary versioning in the vectorizer, not implemented affine-affine test rguenth at gcc dot gnu.org
2013-03-29 8:30 ` Joost.VandeVondele at mat dot ethz.ch
2021-12-22 8:44 ` [Bug tree-optimization/47341] " pinskia 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).