This is an archive of the discontinued LLVM Phabricator instance.

[X86][CostModel] Bump the cost of vpermw/vpermt2b/vperm2w
ClosedPublic

Authored by craig.topper on Apr 29 2020, 4:37 PM.

Details

Summary

vpermw is 2 uops. vpermt2b/vpermt2w are two shuffle uops and a port 015 uop. Weirdly vpermb is a single uop.

This patch bumps the cost to 2 for these operations. Maybe should go to 3 for the vpermt2*, but I've started conservative.

I've also removed a few entries that were now the same as earlier subtargets or that I didn't think we really did. Like I don't think we extend v32i8 to v32i16, shuffle, and then truncate.

Diff Detail

Event Timeline

craig.topper created this revision.Apr 29 2020, 4:37 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 29 2020, 4:37 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
craig.topper marked an inline comment as done.Apr 29 2020, 4:46 PM
craig.topper added inline comments.
llvm/lib/Target/X86/X86TargetTransformInfo.cpp
1092

We would just use pshufb for v8i16.

This revision is now accepted and ready to land.Apr 30 2020, 10:27 AM
This revision was automatically updated to reflect the committed changes.