public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/59642] New: Performance regression (4.7/4.8) with -ftree-loop-distribute-patterns
@ 2013-12-30 21:03 olle at liljenzin dot se
2013-12-30 22:58 ` [Bug tree-optimization/59642] " glisse at gcc dot gnu.org
2014-01-01 19:15 ` glisse at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: olle at liljenzin dot se @ 2013-12-30 21:03 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59642
Bug ID: 59642
Summary: Performance regression (4.7/4.8) with
-ftree-loop-distribute-patterns
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: olle at liljenzin dot se
t.c:
void foo(int *v) {
int *p;
for(p = v; p < v + 2; ++p) *p = 0;
for(p = v; p < v + 2; ++p)
if(*p) *p = 1;
}
4.8.0/4.8.2 (fedora 19, x86_64):
% gcc -O3 -S t.c
movq $0, (%rdi)
movl 4(%rdi), %eax
testl %eax, %eax
je .L1
movl $1, 4(%rdi)
.L1:
rep ret
4.7.3:
movl $0, (%rdi)
movl $0, 4(%rdi)
ret
With -fno-tree-loop-distribute-patterns 4.7 and 4.8 generate same code.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug tree-optimization/59642] Performance regression (4.7/4.8) with -ftree-loop-distribute-patterns
2013-12-30 21:03 [Bug tree-optimization/59642] New: Performance regression (4.7/4.8) with -ftree-loop-distribute-patterns olle at liljenzin dot se
@ 2013-12-30 22:58 ` glisse at gcc dot gnu.org
2014-01-01 19:15 ` glisse at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: glisse at gcc dot gnu.org @ 2013-12-30 22:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59642
--- Comment #1 from Marc Glisse <glisse at gcc dot gnu.org> ---
I've noticed the same in other PRs, normally we manage to track the actual
value of *p, but we don't manage that when *p was written by __builtin_mem*,
which should still be doable:
int f(int*p){
__builtin_memset(p,0,4);
return *p;
}
gives the following .optimized:
__builtin_memset (p_2(D), 0, 4);
_4 = *p_2(D);
return _4;
(RTL fixes things later in this simple case)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug tree-optimization/59642] Performance regression (4.7/4.8) with -ftree-loop-distribute-patterns
2013-12-30 21:03 [Bug tree-optimization/59642] New: Performance regression (4.7/4.8) with -ftree-loop-distribute-patterns olle at liljenzin dot se
2013-12-30 22:58 ` [Bug tree-optimization/59642] " glisse at gcc dot gnu.org
@ 2014-01-01 19:15 ` glisse at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: glisse at gcc dot gnu.org @ 2014-01-01 19:15 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59642
--- Comment #2 from Marc Glisse <glisse at gcc dot gnu.org> ---
(In reply to Marc Glisse from comment #1)
> I've noticed the same in other PRs, normally we manage to track the actual
> value of *p, but we don't manage that when *p was written by __builtin_mem*,
> which should still be doable:
PR 58483 has an example with memcpy.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-01-01 19:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-30 21:03 [Bug tree-optimization/59642] New: Performance regression (4.7/4.8) with -ftree-loop-distribute-patterns olle at liljenzin dot se
2013-12-30 22:58 ` [Bug tree-optimization/59642] " glisse at gcc dot gnu.org
2014-01-01 19:15 ` glisse 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).