If all the operands of a BUILD_VECTOR extract elements from same vector then split the
vector efficiently based on the maximum vector access index.
This will also fix PR 33784
Paths
| Differential D35788
[DAGCombiner] Extending pattern detection for vector shuffle. ClosedPublic Authored by jbhateja on Jul 24 2017, 1:44 AM.
Details
Summary If all the operands of a BUILD_VECTOR extract elements from same vector then split the This will also fix PR 33784
Diff Detail
Event Timelinejbhateja retitled this revision from [DAGCombiner] If all the operands of a BUILD_VECTOR extract elements from same vector then split the vector efficiently based on the maximum vector access index. to [DAGCombiner] Extending pattern detection for vector shuffle..Jul 24 2017, 1:50 AM
Comment Actions Hi Zvi , I'm in process of uploading patch post rebase which should show the changes in asm with the diff. Thanks Comment Actions Hi Simon, Zvi since D35700 also taking care of shuffle_vectors extraction, and this patch is also extending the pattern should it be ok to merge this patch with it. Comment Actions Updating post rebase. Splitting of a vector argument of shuffle vector based on extracted shuffle_mask from the build_vector
Comment Actions A few minors but it looks like its almost there
Comment Actions A few final minor comments, but otherwise LGTM
This revision is now accepted and ready to land.Aug 3 2017, 5:31 AM Comment Actions
Closed by commit rL310058: [DAGCombiner] Extending pattern detection for vector shuffle. (authored by RKSimon). · Explain WhyAug 4 2017, 5:47 AM This revision was automatically updated to reflect the committed changes. This revision is now accepted and ready to land.Aug 5 2017, 7:57 AM This revision now requires changes to proceed.Aug 5 2017, 7:58 AM jbhateja edited edge metadata. Comment Actions
Comment Actions
PR34073 is a huge .cpp test which is running fine now. Comment Actions @ Simon, patch has been updated and good to land, please let me know if anything more is needed here. Comment Actions Hi Simon, patch has been updated and good to land, please let me know if anything more is needed here. Comment Actions LGTM @jbhateja Sorry for the delay - I highly recommend that you request commit rights yourself This revision is now accepted and ready to land.Aug 12 2017, 6:08 AM Closed by commit rL310782: [DAGCombiner] Extending pattern detection for vector shuffle (REAPPLIED) (authored by RKSimon). · Explain WhyAug 12 2017, 10:45 AM This revision was automatically updated to reflect the committed changes. This revision is now accepted and ready to land.Aug 14 2017, 2:14 AM Comment Actions Folks, please consider using utils/shuffle_fuzz.py or some other fuzz testing device. The number of times this lands and gets reverted is becoming fairly disruptive. Comment Actions
Comment Actions Closed by commit rL311255: [DAGCombiner] Extending pattern detection for vector shuffle.
Revision Contents
Diff 109680 lib/CodeGen/SelectionDAG/DAGCombiner.cpp
test/CodeGen/X86/oddshuffles.ll
test/CodeGen/X86/shuffle-vs-trunc-512.ll
test/CodeGen/X86/vector-shuffle-512-v16.ll
test/CodeGen/X86/vector-shuffle-512-v8.ll
test/CodeGen/X86/x86-interleaved-access.ll
|
SDValue has a bool operator for this - you should be able to just test with: