[x86] use PMOVMSK for vector-sized equality comparisons
ClosedPublic

Authored by spatel on Mon, Mar 20, 3:57 PM.

Details

Summary

We could do better by splitting any oversized type into whatever vector size the target supports, but I left that for future work if it ever comes up. The motivating case is memcmp() calls on 16-byte structs, so I think we can wire that up with a TLI hook that feeds into this.

Diff Detail

Repository
rL LLVM
spatel created this revision.Mon, Mar 20, 3:57 PM
zvi added a comment.Tue, Mar 21, 1:56 AM

LGTM.

lib/Target/X86/X86ISelLowering.cpp
34041 ↗(On Diff #92392)

Sure!
And a TODO for AVX-512

RKSimon accepted this revision.Tue, Mar 21, 4:37 AM

LGTM

This revision is now accepted and ready to land.Tue, Mar 21, 4:37 AM
This revision was automatically updated to reflect the committed changes.