On Sep 4, 2020, Segher Boessenkool <seg...@kernel.crashing.org> wrote:
> Please open a PR? (But see below first.) I saw the bit below, then filed https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96965 > Btw, we could perhaps try permuting arms in combine itself (not in > recog)? In combine we know that there are at most 4 sets (and usually > at most 3), and we also often have a good idea what swaps are likely > to work and which not, so maybe trying just one extra thing will have > good results already. That makes sense. Perhaps for starters we could just recall that the original i2 was (parallel [i1 i2]), i.e., with i1 appearing first, so that added_sets tried to insert i1 first rather than last. That would catch this case, and likely any case in which we i1 is split out of i2 and i2 rather than i1 feeds i3. When it is i1 that feeds i3, we'll have added_sets_2 and add i2 last in the i3 parallel, which is happens to already be the most likely order for recog. In both cases, the likelihood follows from the fact that i1 and i2 were split, in this order, out of the original i2's parallel. -- Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer