This is an archive of the discontinued LLVM Phabricator instance.

[X86] Make the type checks in detectAVX512USatPattern more robust
ClosedPublic

Authored by craig.topper on Jan 30 2018, 1:38 PM.

Details

Summary

This code currently uses isSimple and getSizeInBits in an attempt to prune types. But isSimple will return true for any type that any target supports natively. I don't think that's a good way to prune types. I also don't think the dest element type checks are very robust since we didn't do an isSimple check on the dest type.

This patch adds a check for the input type being legal to the one caller that didn't already check that. Then we explicitly check the element types for the destination are i8, i16, or i32.

Diff Detail

Repository
rL LLVM

Event Timeline

craig.topper created this revision.Jan 30 2018, 1:38 PM
RKSimon accepted this revision.Jan 31 2018, 7:36 AM

LGTM

This revision is now accepted and ready to land.Jan 31 2018, 7:36 AM
This revision was automatically updated to reflect the committed changes.