https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78103
--- Comment #14 from Jakub Jelinek <jakub at gcc dot gnu.org> --- (In reply to Segher Boessenkool from comment #13) > (In reply to Jakub Jelinek from comment #10) > > Unfortunately, it doesn't work for the #c0 testcase, after the combiner > > splitter kicks in, the combiner doesn't even try that 4 insn combination. > > It does for me? But only in the unpatched gcc, no? For #c0 findLastSet I actually need to combine 5 original instructions, and what I was hoping for is to first combine first 3 instructions into 2, 9, 10 -> 12 to get rid of the useless sign-extension, the value is known to be 0..63, so zero extension is fine, into 10 (bsr) and 12 (xor with zero extend), which is what the #c9 patch does. And then I was hoping 10, 12, 13 -> 14 would be attempted to be combined because 13 is mov of a constant. But that doesn't happen because the 9, 10 -> 12 combination with the #c9 patch throws away the 12 -> 10 LOG_LINKS and doesn't add a new one, even when 10 is a setter of a fresh new pseudo and 12 is the only use of that pseudo.