On 4/4/25 3:22 AM, Richard Sandiford wrote:
When combining a single-set i2 into a multi-set i3, combine first tries to match the new multi-set in-place. If that fails, combine considers splitting the multi-set so that one set goes in i2 and the other set stays in i3. That moves a destination from i3 to i2 and so combine needs to update any associated log link for that destination to point to i2 rather than i3. However, that kind of split can also occur for 2->2 combinations. For a 2-instruction combination in which i2 doesn't die in i3, combine tries a 2->1 combination by turning i3 into a parallel of the original i2 and the combined i3. If that fails, combine will split the parallel as above, so that the first set goes in i2 and the second set goes in i3. But that can often leave i2 unchanged, meaning that no destinations have moved and so no search is necessary. gcc/ PR testsuite/116398 * combine.cc (try_combine): Shortcut the split_i2i3 handling if i2 is unchanged.
OK. Jeff