On Sun, Aug 04, 2019 at 07:11:01PM +0200, Uros Bizjak wrote: > Yes, the approach looks OK to me. It makes chain building mode > agnostic, and the chain building can be used for > a) DImode x86_32 (as is now), but maybe 64bit minmax operation can be added. > b) SImode x86_32 and x86_64 (this will be mainly used for SImode > minmax and surrounding SImode operations) > c) DImode x86_64 (also, mainly used for DImode minmax and surrounding > DImode operations) > > > Still need help with the actual patterns for minmax and how the splitters > > should look like. > > Please look at the attached patch. Maybe we can add memory_operand as > operand 1 and operand 2 predicate, but let's keep things simple for > now.
Shouldn't it be used also for p{min,max}ud rather than just p{min,max}sd? What about p{min,max}{s,u}{b,w,q}? Some of those are already in SSE. If the conversion of the chain fails, couldn't the STV pass split those SImode etc. min/max patterns into code with branches, rather than turn it into cmovs? Jakub