This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug regression/68695] New: Performance regression related to ssa patch / ifcvt
- From: "vogt at linux dot vnet.ibm.com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 04 Dec 2015 12:37:30 +0000
- Subject: [Bug regression/68695] New: Performance regression related to ssa patch / ifcvt
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68695
Bug ID: 68695
Summary: Performance regression related to ssa patch / ifcvt
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: regression
Assignee: unassigned at gcc dot gnu.org
Reporter: vogt at linux dot vnet.ibm.com
CC: aoliva at gcc dot gnu.org, krebbel at gcc dot gnu.org
Target Milestone: ---
Host: s390x
Target: s390x
Build: s390x
This commit introduced a performance regression on s390/s390x:
https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=224262
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64164#c35
With the change committed the ifcvt-4.c test program (current HEAD) results in
much less efficient assembly language code.
-- snip --
int
foo (int x, int y, int a)
{
int i = x;
int j = y;
/* Try to make taking the branch likely. */
__builtin_expect (x > y, 1);
if (x > y)
{
i = a;
j = i;
}
return i * j;
}
-- snip --
Before change:
$ gcc -O2 -S -m64 ifcvt-4.c
-- snip --
foo:
.LFB0:
.cfi_startproc
cr %r2,%r3
jle .L2
lgr %r3,%r4
lgr %r2,%r4
.L2:
msr %r2,%r3
lgfr %r2,%r2
br %r14
-- snip --
After change:
$ gcc -O2 -S -m64 ifcvt-4.c
-- snip --
foo:
.LFB0:
cr %r2,%r3
jle .L3
lr %r3,%r4
lr %r2,%r4
msr %r2,%r3
lgfr %r2,%r2
br %r14
.L3:
lr %r4,%r2
lr %r2,%r4
msr %r2,%r3
lgfr %r2,%r2
br %r14
-- snip --
I can provide specific rtl dumps or other information if you tell what you
need.