[PATCH] D83789: [X86][SSE] Attempt to match OP(SHUFFLE(X,Y),SHUFFLE(X,Y)) -> SHUFFLE(HOP(X,Y))
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 14 09:59:07 PDT 2020
RKSimon created this revision.
RKSimon added reviewers: craig.topper, spatel, dyung.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.
An initial backend patch towards fixing the various poor HADD combines (PR34724, PR41813, PR45747 etc.).
This extends isHorizontalBinOp to check if we have per-element horizontal ops (odd+even element pairs), but not in the expected serial order - in which case we build a "post shuffle mask" that we can apply to the HOP result, assuming we have fast-hops/optsize etc.
The next step will be to extend the SHUFFLE(HOP(X,Y)) combines as suggested on PR41813 - accepting more post-shuffle masks even on slow-hop targets if we can fold it into another shuffle.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D83789
Files:
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/haddsub-3.ll
llvm/test/CodeGen/X86/haddsub-shuf.ll
llvm/test/CodeGen/X86/haddsub-undef.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83789.277884.patch
Type: text/x-patch
Size: 23471 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200714/f696ac0e/attachment.bin>
More information about the llvm-commits
mailing list