Hi Vladimir,
Thanks for reviewing my other patch for PR46178. Although you mentioned
the priority algorithm is bound for removal, I still have another
related patch.
This fix is for PR46002: during update_copy_costs(), when we obtain the
cover class for a copy-related allocno, it is not sufficient to test if
the two reg-classes intersect; the assigned register in the current
allocno must be *in* in the intersection. Otherwise the classes may
intersect, but the currently assigned register is not valid for
assigning to the other allocno (then ICE in the index>= 0 assertion).
This patch changes the copy skipping test, from testing cover class
intersection, into a test of if 'hard_regno' is within the cover class
of 'another_allocno'.
Bootstrapped and tested on x86_64 with no regressions. Comparing test
results under -fira-algorithm=priority also shows many fewer FAILs. Okay
for trunk?