[llvm-commits] [llvm] r168889 - /llvm/trunk/lib/Transforms/Instrumentation/MemorySanitizer.cpp
Kostya Serebryany
kcc at google.com
Thu Nov 29 08:54:38 PST 2012
Unittests?
(I know, we'll have this tested in runnable tests, but .ll tests won't
hurt).
On Thu, Nov 29, 2012 at 7:22 PM, Evgeniy Stepanov <eugeni.stepanov at gmail.com
> wrote:
> Author: eugenis
> Date: Thu Nov 29 09:22:06 2012
> New Revision: 168889
>
> URL: http://llvm.org/viewvc/llvm-project?rev=168889&view=rev
> Log:
> [msan] Handle vector manipulation instructions.
>
> Handle insertelement, extractelement, shufflevector.
>
> Modified:
> llvm/trunk/lib/Transforms/Instrumentation/MemorySanitizer.cpp
>
> Modified: llvm/trunk/lib/Transforms/Instrumentation/MemorySanitizer.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/MemorySanitizer.cpp?rev=168889&r1=168888&r2=168889&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Transforms/Instrumentation/MemorySanitizer.cpp
> (original)
> +++ llvm/trunk/lib/Transforms/Instrumentation/MemorySanitizer.cpp Thu Nov
> 29 09:22:06 2012
> @@ -743,6 +743,31 @@
> 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);
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121129/73c3fa06/attachment.html>
More information about the llvm-commits
mailing list