public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/19347] Invariant load not moved out of loop
[not found] <bug-19347-4@http.gcc.gnu.org/bugzilla/>
@ 2024-01-03 19:14 ` phosit at autistici dot org
2024-01-03 19:35 ` phosit at autistici dot org
1 sibling, 0 replies; 6+ messages in thread
From: phosit at autistici dot org @ 2024-01-03 19:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19347
Phosit <phosit at autistici dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |phosit at autistici dot org
--- Comment #9 from Phosit <phosit at autistici dot org> ---
When there are few iterations (likely when it is unroled) there is no
alias-check:
void fill(int* data, int& value)
{
for(unsigned long i{0}; i != 4; ++i)
data[i] = value;
}
--- at -O2 results in:
fill(int*, int&):
movd xmm1, DWORD PTR [rsi]
pshufd xmm0, xmm1, 0xe0
movq QWORD PTR [rdi], xmm0
movd xmm0, DWORD PTR [rsi]
pshufd xmm0, xmm0, 0xe0
movq QWORD PTR [rdi+8], xmm0
ret
---
At -O3 the loop isn't removed and (thus) there is an alias-check.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/19347] Invariant load not moved out of loop
[not found] <bug-19347-4@http.gcc.gnu.org/bugzilla/>
2024-01-03 19:14 ` [Bug tree-optimization/19347] Invariant load not moved out of loop phosit at autistici dot org
@ 2024-01-03 19:35 ` phosit at autistici dot org
1 sibling, 0 replies; 6+ messages in thread
From: phosit at autistici dot org @ 2024-01-03 19:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19347
--- Comment #10 from Phosit <phosit at autistici dot org> ---
The analysis in my previous comment is wrong.
I don't know why there is no alias-check at -O2.
Also the loop _is_ removed at -O3.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/19347] Invariant load not moved out of loop
[not found] <bug-19347-9531@http.gcc.gnu.org/bugzilla/>
2005-10-24 0:20 ` pinskia at gcc dot gnu dot org
@ 2009-04-03 12:06 ` rguenth at gcc dot gnu dot org
1 sibling, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-04-03 12:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from rguenth at gcc dot gnu dot org 2009-04-03 12:06 -------
The store to *ptr aliases the load from osmesa->clearpixel - there
is no (easy) way to otherwise prove that it is not (at least with the
testcase).
We do not see where osmesa->buffer points to (it may point to
&osmesa->clearpixel).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19347
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/19347] Invariant load not moved out of loop
[not found] <bug-19347-9531@http.gcc.gnu.org/bugzilla/>
@ 2005-10-24 0:20 ` pinskia at gcc dot gnu dot org
2009-04-03 12:06 ` rguenth at gcc dot gnu dot org
1 sibling, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-24 0:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2005-10-24 00:20 -------
This is the normal, we need offset/varaible aliasing.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dberlin at gcc dot gnu dot
| |org
Keywords| |alias
Last reconfirmed|2005-05-04 18:15:55 |2005-10-24 00:20:32
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19347
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/19347] Invariant load not moved out of loop
2005-01-09 10:51 [Bug tree-optimization/19347] New: " irar at il dot ibm dot com
2005-01-09 15:55 ` [Bug tree-optimization/19347] " pinskia at gcc dot gnu dot org
@ 2005-04-11 6:10 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-11 6:10 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
Last reconfirmed|2005-01-09 15:55:15 |2005-04-11 06:09:59
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19347
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/19347] Invariant load not moved out of loop
2005-01-09 10:51 [Bug tree-optimization/19347] New: " irar at il dot ibm dot com
@ 2005-01-09 15:55 ` pinskia at gcc dot gnu dot org
2005-04-11 6:10 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-09 15:55 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-01-09 15:55 -------
Confirmed but add a full testcase here, thanks.
Actually I don't think it would require whole program analysis to do this in LIM (or LICM), we just need
more information (which might be done on the structure-aliasing branch).
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |missed-optimization
Last reconfirmed|0000-00-00 00:00:00 |2005-01-09 15:55:15
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19347
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-01-03 19:35 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-19347-4@http.gcc.gnu.org/bugzilla/>
2024-01-03 19:14 ` [Bug tree-optimization/19347] Invariant load not moved out of loop phosit at autistici dot org
2024-01-03 19:35 ` phosit at autistici dot org
[not found] <bug-19347-9531@http.gcc.gnu.org/bugzilla/>
2005-10-24 0:20 ` pinskia at gcc dot gnu dot org
2009-04-03 12:06 ` rguenth at gcc dot gnu dot org
2005-01-09 10:51 [Bug tree-optimization/19347] New: " irar at il dot ibm dot com
2005-01-09 15:55 ` [Bug tree-optimization/19347] " pinskia at gcc dot gnu dot org
2005-04-11 6:10 ` pinskia at gcc dot gnu dot 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).