mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-08 21:32:39 +00:00
Add documentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167055 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
203e6f60a8
commit
a368b89f28
@ -749,16 +749,21 @@ SingleBlockLoopVectorizer::createEmptyLoop(LoopVectorizationLegality *Legal) {
|
||||
}
|
||||
|
||||
|
||||
/// This function returns the identity element (or neutral element) for
|
||||
/// the operation K.
|
||||
static unsigned
|
||||
getReductionIdentity(LoopVectorizationLegality::ReductionKind K) {
|
||||
switch (K) {
|
||||
case LoopVectorizationLegality::IntegerXor:
|
||||
case LoopVectorizationLegality::IntegerAdd:
|
||||
case LoopVectorizationLegality::IntegerOr:
|
||||
// Adding, Xoring, Oring zero to a number does not change it.
|
||||
return 0;
|
||||
case LoopVectorizationLegality::IntegerMult:
|
||||
// Multiplying a number by 1 does not change it.
|
||||
return 1;
|
||||
case LoopVectorizationLegality::IntegerAnd:
|
||||
// AND-ing a number with an all-1 value does not change it.
|
||||
return -1;
|
||||
default:
|
||||
llvm_unreachable("Unknown reduction kind");
|
||||
|
Loading…
x
Reference in New Issue
Block a user