https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115835
Bug ID: 115835
Summary: [15 regression] FAIL:
gcc.target/s390/section-anchors.c since
r15-1579-g792f97b44ffc5e
Product: gcc
Version: unknown
Status: UNCONFIRMED
Keywords: testsuite-fail
Severity: normal
Priority: P3
Component: rtl-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: stefansf at gcc dot gnu.org
Target Milestone: ---
Target: s390*-*-*
Prior r15-1579-g792f97b44ffc5e we emitted for
int a = 1, b = 2;
void
f ()
{
a = 1234;
b = 5678;
}
a single load address
f:
larl %r1,.LANCHOR0
mvhi 0(%r1),1234
mvhi 4(%r2),5678
br %r14
whereas afterwards we emit two
f:
larl %r1,.LANCHOR0
larl %r2,.LANCHOR0+4
mvhi 0(%r1),1234
mvhi 0(%r2),5678
br %r14
This is due to late_combine1 merging larl with the move resulting in
(insn 6 2 8 2 (set (mem/c:SI (symbol_ref:DI ("*.LANCHOR0") [flags 0x182]) [1
a+0 S4 A32])
(const_int 1234 [0x4d2])) "section-anchors.c":11:5 1495 {*movsi_zarch}
(nil))
(insn 8 6 0 2 (set (mem/c:SI (const:DI (plus:DI (symbol_ref:DI ("*.LANCHOR0")
[flags 0x182])
(const_int 4 [0x4]))) [1 b+0 S4 A32])
(const_int 5678 [0x162e])) "section-anchors.c":12:5 1495 {*movsi_zarch}
(nil))
which get split by late_combine2 again
(insn 13 2 6 2 (set (reg:DI 1 %r1 [65])
(symbol_ref:DI ("*.LANCHOR0") [flags 0x182])) "section-anchors.c":11:5
1489 {*movdi_64}
(nil))
(insn 6 13 14 2 (set (mem/c:SI (reg:DI 1 %r1 [65]) [1 a+0 S4 A32])
(const_int 1234 [0x4d2])) "section-anchors.c":11:5 1495 {*movsi_zarch}
(nil))
(insn 14 6 8 2 (set (reg:DI 1 %r1 [67])
(const:DI (plus:DI (symbol_ref:DI ("*.LANCHOR0") [flags 0x182])
(const_int 4 [0x4])))) "section-anchors.c":12:5 1489
{*movdi_64}
(nil))
(insn 8 14 11 2 (set (mem/c:SI (reg:DI 1 %r1 [67]) [1 b+0 S4 A32])
(const_int 5678 [0x162e])) "section-anchors.c":12:5 1495 {*movsi_zarch}
(nil))