Fix for __vec16_i64 element extracting
This commit is contained in:
14
cbackend.cpp
14
cbackend.cpp
@@ -4418,10 +4418,16 @@ void CWriter::visitShuffleVectorInst(llvm::ShuffleVectorInst &SVI) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Do an extractelement of this value from the appropriate input.
|
// Do an extractelement of this value from the appropriate input.
|
||||||
Out << "((";
|
if (OpElts != 1) { // all __vec16_* have overloaded operator []
|
||||||
printType(Out, llvm::PointerType::getUnqual(EltTy));
|
Out << "(" << GetValueName(Op)
|
||||||
Out << ")(&" << GetValueName(Op)
|
<< ")[" << SrcVal << "]";
|
||||||
<< "))[" << SrcVal << "]";
|
}
|
||||||
|
else { // but __vec1_* don't have it
|
||||||
|
Out << "((";
|
||||||
|
printType(Out, llvm::PointerType::getUnqual(EltTy));
|
||||||
|
Out << ")(&" << GetValueName(Op)
|
||||||
|
<< "))[" << SrcVal << "]";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user