[Bug rtl-optimization/83628] [8 Regression] performance regression when accessing arrays on alpha
ubizjak at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Jan 4 12:28:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83628
Uroš Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |NEW
CC| |law at gcc dot gnu.org,
| |rsandifo at gcc dot gnu.org,
| |segher at gcc dot gnu.org
Component|target |rtl-optimization
Assignee|ubizjak at gmail dot com |unassigned at gcc dot gnu.org
Target Milestone|--- |8.0
Summary|performance regression when |[8 Regression] performance
|accessing arrays on alpha |regression when accessing
| |arrays on alpha
--- Comment #4 from Uroš Bizjak <ubizjak at gmail dot com> ---
The remaining regression is in make_compound_operation function in combine.c.
In the following testcase:
int test (int a, int b)
{
return a + b * 4;
}
the compiler (gcc-5) combined:
(insn 7 4 8 2 (set (reg:DI 76)
(ashift:DI (reg/v:DI 74 [ b ])
(const_int 2 [0x2]))) cmp.c:3 64 {ashldi3}
(expr_list:REG_DEAD (reg/v:DI 74 [ b ])
(nil)))
(insn 8 7 9 2 (set (reg:SI 75 [ D.1494 ])
(plus:SI (subreg:SI (reg:DI 76) 0)
(subreg/s/u:SI (reg/v:DI 73 [ a ]) 0))) cmp.c:3 3 {addsi3}
(expr_list:REG_DEAD (reg:DI 76)
(expr_list:REG_DEAD (reg/v:DI 73 [ a ])
(nil))))
into:
Trying 7 -> 8:
Successfully matched this instruction:
(set (reg:SI 75 [ D.1494 ])
(plus:SI (mult:SI (reg:SI 17 $17 [ b ])
(const_int 4 [0x4]))
(reg:SI 16 $16 [ a ])))
This is not the case anymore, the compiler (gcc-8) fails combination with:
Trying 7 -> 8:
7: r75:DI=$17:DI<<0x2
REG_DEAD $17:DI
8: r74:SI=$16:SI+r75:DI#0
REG_DEAD $16:DI
REG_DEAD r75:DI
Failed to match this instruction:
(set (reg:SI 74)
(plus:SI (subreg:SI (ashift:DI (reg:DI 17 $17 [ b ])
(const_int 2 [0x2])) 0)
(reg:SI 16 $16 [ a ])))
This is a rtl-optimization regression from gcc-5 branch.
More information about the Gcc-bugs
mailing list