[PATCH] D106358: [InstCombine] Add more complex folds for extractelement + stepvector
David Sherwood via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 20 06:18:42 PDT 2021
david-arm created this revision.
david-arm added reviewers: sdesmalen, DylanFleming-arm, CarolineConcatto, peterwaller-arm.
Herald added a subscriber: hiraditya.
david-arm requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
I have updated cheapToScalarize to also consider the case when
extracting lanes from a stepvector intrinsic. This required removing
the existing 'bool IsConstantExtractIndex' and passing in the actual
index as a Value instead. We do this because we need to know if the
index is <= known minimum number of elements returned by the stepvector
intrinsic. Effectively, when extracting lane X from a stepvector we
know the value returned is also X.
New tests added here:
Transforms/InstCombine/vscale_extractelement.ll
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D106358
Files:
llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
llvm/test/Transforms/InstCombine/vscale_extractelement.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106358.360105.patch
Type: text/x-patch
Size: 5734 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210720/65ef7c43/attachment.bin>
More information about the llvm-commits
mailing list