mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-19 18:24:00 +00:00
Mark vector loops as already vectorized
Make sure we mark all loops (scalar and vector) when vectorizing, so that we don't try to vectorize them anymore. Also, set unroll to 1, since this is what we check for on early exit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193349 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -801,6 +801,7 @@ struct LoopVectorizeHints {
|
||||
Vals.push_back(LoopID->getOperand(i));
|
||||
|
||||
Vals.push_back(createHint(Context, Twine(Prefix(), "width").str(), Width));
|
||||
Vals.push_back(createHint(Context, Twine(Prefix(), "unroll").str(), 1));
|
||||
|
||||
MDNode *NewLoopID = MDNode::get(Context, Vals);
|
||||
// Set operand 0 to refer to the loop id itself.
|
||||
@ -1785,6 +1786,9 @@ InnerLoopVectorizer::createEmptyLoop(LoopVectorizationLegality *Legal) {
|
||||
LoopExitBlock = ExitBlock;
|
||||
LoopVectorBody = VecBody;
|
||||
LoopScalarBody = OldBasicBlock;
|
||||
|
||||
LoopVectorizeHints Hints(Lp, true);
|
||||
Hints.setAlreadyVectorized(Lp);
|
||||
}
|
||||
|
||||
/// This function returns the identity element (or neutral element) for
|
||||
|
Reference in New Issue
Block a user