On 8/21/24 8:48 AM, Hans-Peter Nilsson wrote:
The only thing that's changed with the patch in v2 since the
first version (pinged once) is the commit message. CC to
the nexts-of-kin as a heads-up.
Regtested cross to cris-elf and native x86_64-linux-gnu at
r15-3043-g64028d626a50. The gcc.dg/guality/pr54200.c
magically being fixed was also noticed at an earlier
test-run, at r15-1880-gce34fcc572a0. I see on
gcc-testresults that this test fails for several targets.
Ok to commit?
-- >8 --
The first of the late-combine passes, propagates some of the copies
made during the (in-time-)combine pass in make_more_copies into the
users of the "original" pseudo registers and removes the "old"
pseudos. That effectively removes attributes such as REG_POINTER,
which matter to LRA. The quoted PR is for an ICE-manifesting bug that
was exposed by the late-combine pass and went back to hiding with this
patch until commit r15-2937-g3673b7054ec2, the fix for PR116236, when
it was actually fixed. To wit, this patch is only incidentally
related to that bug.
In other words, the REG_POINTER attribute should not be required for
LRA to work correctly. This patch merely corrects state for those
propagated register-uses to ante late-combine.
For reasons not investigated, this fixes a failing test
"FAIL: gcc.dg/guality/pr54200.c -Og -DPREVENT_OPTIMIZATION line 20 z == 3"
for x86_64-linux-gnu.
PR middle-end/115883
* combine.cc (make_more_copies): Copy attributes from the original
pseudo to the new copy.
OK, though please use old fashioned C comment style since that's the
style used everywhere else is combine.cc. No need to wait for review on
the comment style change ;-)
jeff