OSDN Git Service

[SLPVectorizer] Support alternate opcodes in tryToVectorizeList
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 22 Jun 2018 16:37:34 +0000 (16:37 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 22 Jun 2018 16:37:34 +0000 (16:37 +0000)
commit5a40cf8639524627ab367dfb452e8dd23b76e559
treea601b96c246e25a946d6ca9765c4ef3a4a71e3c7
parente0f992ea7d99e3e70c39cafd33829c00a8552521
[SLPVectorizer] Support alternate opcodes in tryToVectorizeList

Enable tryToVectorizeList to support InstructionsState alternate opcode patterns at a root (build vector etc.) as well as further down the vectorization tree.

NOTE: This patch reduces some of the debug reporting if there are opcode mismatches - I can try to add it back if it proves a problem. But it could get rather messy trying to provide equivalent verbose debug strings via getSameOpcode etc.

Differential Revision: https://reviews.llvm.org/D48488

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335364 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Vectorize/SLPVectorizer.cpp
test/Transforms/SLPVectorizer/X86/alternate-fp.ll
test/Transforms/SLPVectorizer/X86/alternate-int.ll
test/Transforms/SLPVectorizer/X86/remark_not_all_parts.ll
test/Transforms/SLPVectorizer/X86/resched.ll