https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87763
--- Comment #38 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Andrew Pinski from comment #37) > (In reply to Jeffrey A. Law from comment #36) > > I wonder if we could pass in a scratch register from try_combine down to > > make_field_assignment to facilitate something like this... > > I have found that make_field_assignment needs a lot of work in the past. I > had a few patches to make_field_assignment to improve it in the GCC 4.3 days > but never updated them for newer compiler versions as the code generationg > which I was fixing up was already fixed; it was for some bad generated SRA > issue. > Maybe for GCC 10, I will look into improving make_field_assignment. Also I should mention I tried in the past having make_field_assignment making a sequence of instructions (two) where one was the assignment and the second one was the zero_extract assignment. This was done in the 4.7 days. I could not fix the rest of combine doing the correct thing and had to give up as I was running out of time before a release was needed to be made. I will try again. This was exactly what you were asking to do to make_field_assignment too.