Fix for __vec16_i64 element extracting

This commit is contained in:
Vsevolod Livinskiy
2015-01-30 16:26:18 +03:00
parent 64bc48863d
commit 7816fae331

View File

@@ -4418,6 +4418,11 @@ 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.
if (OpElts != 1) { // all __vec16_* have overloaded operator []
Out << "(" << GetValueName(Op)
<< ")[" << SrcVal << "]";
}
else { // but __vec1_* don't have it
Out << "(("; Out << "((";
printType(Out, llvm::PointerType::getUnqual(EltTy)); printType(Out, llvm::PointerType::getUnqual(EltTy));
Out << ")(&" << GetValueName(Op) Out << ")(&" << GetValueName(Op)
@@ -4425,6 +4430,7 @@ void CWriter::visitShuffleVectorInst(llvm::ShuffleVectorInst &SVI) {
} }
} }
} }
}
Out << ")"; Out << ")";
} }