This is an archive of the discontinued LLVM Phabricator instance.

[X86] Combine to vpdpbusd when operand is constant and small enough.
ClosedPublic

Authored by LuoYuanke on Dec 29 2021, 12:07 AM.

Diff Detail

Event Timeline

LuoYuanke created this revision.Dec 29 2021, 12:07 AM
LuoYuanke requested review of this revision.Dec 29 2021, 12:07 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 29 2021, 12:07 AM

Update test cases.

Precommit the tests and rebase to show the diff in codegen?

llvm/test/CodeGen/X86/dpbusd_const.ll
2

Add avxvnni target coverage?

LuoYuanke updated this revision to Diff 398602.Jan 10 2022, 6:00 AM

Address Simon's comments.

Pre-commit the tests + rebase so this patch shows the codegen diff?

Rebase and pre-checkin the test case.

LuoYuanke added inline comments.Jan 15 2022, 11:14 PM
llvm/test/CodeGen/X86/dpbusd_const.ll
124

This looks not good, as it accesses more memory.

RKSimon added inline comments.Jan 16 2022, 3:01 AM
llvm/test/CodeGen/X86/dpbusd_const.ll
124

This is very similar to https://llvm.org/PR45808 - we're not making use of implicit zeroing of upper subvectors to make smaller constants

Shrink the constant size to 128 bits if the higher bits are zeros.

RKSimon accepted this revision.Jan 19 2022, 12:24 AM

LGTM - with one minor

llvm/lib/Target/X86/X86ISelLowering.cpp
9253

foled -> folded

This revision is now accepted and ready to land.Jan 19 2022, 12:24 AM

Address Simon's comments. Thanks for review.