[PATCH] D28907: [SLP] Fix for PR30787: Failure to beneficially vectorize 'copyable' elements in integer binary ops.

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 20 01:53:38 PST 2017


ABataev added a comment.

In https://reviews.llvm.org/D28907#650938, @mkuper wrote:

> Is there any way to split this into several smaller patches?


Nope, I'm afraid not. It is a single patch. One changes are meaningless without others while others won't work at all without the first.

> Alternatively / in addition, it would be good to have a high-level explanation of what this patch actually does, other than " improve vectorization ".

Ok, I'll try. Previously it was required that all candidate instructions for vectorization had the same opcode. But if we have several instructions with binary operation opcodes, but others have different opcodes, we still can try to vectorize this vector of instructions by emulating the same binary operations.
For example, if we'd like to vectorize a bunch of instructions `<load, add, add, add>`. The first instruction alternative can be represented as `add load, 0` and try to vectorize `<{add load, 0}, add, add, add>` vector of instructions.
This patch tries to do it for integer and floating point binary operations (for floating point only if unsafe algebra mode is on).


https://reviews.llvm.org/D28907





More information about the llvm-commits mailing list