[PATCH] D49135: [SLPVectorizer] Add initial alternate opcode support for cast instructions.
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 10 07:22:07 PDT 2018
RKSimon created this revision.
RKSimon added reviewers: ABataev, dtemirbulatov, spatel.
We currently only support binary instructions in the alternate opcode shuffles.
This patch is an initial attempt at adding cast instructions as well, this raises several issues that we probably want to address as we continue to generalize the alternate mechanism:
1 - Duplication of cost determination - we should probably add scalar/vector costs helper functions and get BoUpSLP::getEntryCost to use them instead of determining costs directly.
2 - Support alternate instructions with the same opcode (e.g. casts with different src types) - alternate vectorization of calls with different IntrinsicIDs will require this.
3 - Allow alternates to be a different instruction type - mixing binary/cast/call etc.
4 - Allow passthrough of unsupported alternate instructions - related to PR30787/https://reviews.llvm.org/D28907 'copyable' elements.
Repository:
rL LLVM
https://reviews.llvm.org/D49135
Files:
lib/Transforms/Vectorize/SLPVectorizer.cpp
test/Transforms/SLPVectorizer/X86/alternate-cast.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49135.154801.patch
Type: text/x-patch
Size: 20657 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180710/c147dbe1/attachment-0001.bin>
More information about the llvm-commits
mailing list