mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
use the getSplat API. Patch by Paul Redmond.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167892 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
242343d1ab
commit
e123fd9c59
@ -549,13 +549,7 @@ Value *SingleBlockLoopVectorizer::getVectorValue(Value *V) {
|
|||||||
|
|
||||||
Constant*
|
Constant*
|
||||||
SingleBlockLoopVectorizer::getUniformVector(unsigned Val, Type* ScalarTy) {
|
SingleBlockLoopVectorizer::getUniformVector(unsigned Val, Type* ScalarTy) {
|
||||||
SmallVector<Constant*, 8> Indices;
|
return ConstantVector::getSplat(VF, ConstantInt::get(ScalarTy, Val, true));
|
||||||
// Create a vector of consecutive numbers from zero to VF.
|
|
||||||
for (unsigned i = 0; i < VF; ++i)
|
|
||||||
Indices.push_back(ConstantInt::get(ScalarTy, Val, true));
|
|
||||||
|
|
||||||
// Add the consecutive indices to the vector value.
|
|
||||||
return ConstantVector::get(Indices);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SingleBlockLoopVectorizer::scalarizeInstruction(Instruction *Instr) {
|
void SingleBlockLoopVectorizer::scalarizeInstruction(Instruction *Instr) {
|
||||||
|
Loading…
Reference in New Issue
Block a user