https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77438
--- Comment #3 from Uroš Bizjak <ubizjak at gmail dot com> --- (In reply to Richard Biener from comment #2) > I belive that's on purpose because the compiler cannot introduce MMX > usage because of the overlap with the x87 register stack. True. It is even worse, x87 stack gets disbled (all values are NaNs) as soon as MMX reg is touched, and stays disabled until EMMS is executed. > Thus indeed - do not use MMX. I believe there is no attempt being made > to improve code generation for the (obsolete) MMX CPU feature. Register allocator is fine-tuned to avoid MMX registers unless there is really no other way to handle the value. The compiler is actually walking on the edge in order to provide correct functionality, not optimized code. I can assure you that nobody will touch these tunings, so this missed-optimization PR is WONTFIX as far as x86 backend is concerned. > For vector lowering instead of falling back to integer ops support we can > also fall back to using a larger vector size (maybe controlled by a target > hook). Vector lowering would need to fill the excess elements with proper > values of course (not zero in case it is used in a division for example). Maybe we should keep the PR open to track the above idea.