[IR] Improve member `ShuffleVectorInst::isReplicationMask()`
authorRoman Lebedev <lebedev.ri@gmail.com>
Fri, 5 Nov 2021 16:11:55 +0000 (19:11 +0300)
committerRoman Lebedev <lebedev.ri@gmail.com>
Fri, 5 Nov 2021 21:09:27 +0000 (00:09 +0300)
commita5cd27880a258df7df32ec1553d9e4ca7e1868a0
tree133c4c4b14dc63c603044f9dc6973368a920491e
parent6d48e2505c7a68a470e75b61ad504d51db0f8a36
[IR] Improve member `ShuffleVectorInst::isReplicationMask()`

When we have an actual shuffle, we can impose the additional restriction
that the mask replicates the elements of the first operand, so we know
the replication factor as a ratio of output and op0 vector sizes.
llvm/include/llvm/IR/Instructions.h
llvm/lib/IR/Instructions.cpp
llvm/unittests/IR/InstructionsTest.cpp