mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-03 14:08:57 +00:00
[msan] Handle vector manipulation instructions.
Handle insertelement, extractelement, shufflevector. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168889 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b096a9d02f
commit
2aac385417
@ -743,6 +743,31 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
|
||||
IRB.CreateAlignedStore(getOrigin(Val), getOriginPtr(Addr, IRB), I.getAlignment());
|
||||
}
|
||||
|
||||
// Vector manipulation.
|
||||
void visitExtractElementInst(ExtractElementInst &I) {
|
||||
insertCheck(I.getOperand(1), &I);
|
||||
IRBuilder<> IRB(&I);
|
||||
setShadow(&I, IRB.CreateExtractElement(getShadow(&I, 0), I.getOperand(1),
|
||||
"_msprop"));
|
||||
setOrigin(&I, getOrigin(&I, 0));
|
||||
}
|
||||
|
||||
void visitInsertElementInst(InsertElementInst &I) {
|
||||
insertCheck(I.getOperand(2), &I);
|
||||
IRBuilder<> IRB(&I);
|
||||
setShadow(&I, IRB.CreateInsertElement(getShadow(&I, 0), getShadow(&I, 1),
|
||||
I.getOperand(2), "_msprop"));
|
||||
setOriginForNaryOp(I);
|
||||
}
|
||||
|
||||
void visitShuffleVectorInst(ShuffleVectorInst &I) {
|
||||
insertCheck(I.getOperand(2), &I);
|
||||
IRBuilder<> IRB(&I);
|
||||
setShadow(&I, IRB.CreateShuffleVector(getShadow(&I, 0), getShadow(&I, 1),
|
||||
I.getOperand(2), "_msprop"));
|
||||
setOriginForNaryOp(I);
|
||||
}
|
||||
|
||||
// Casts.
|
||||
void visitSExtInst(SExtInst &I) {
|
||||
IRBuilder<> IRB(&I);
|
||||
|
Loading…
Reference in New Issue
Block a user