[PATCH] D62815: Add UnaryOperator visitor to DataFlowSanitizer
Phabricator via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 19 08:08:28 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL363814: [DFSan] Add UnaryOperator visitor to DataFlowSanitizer (authored by mcinally, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D62815?vs=202740&id=205596#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62815/new/
https://reviews.llvm.org/D62815
Files:
llvm/trunk/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
llvm/trunk/test/Instrumentation/DataFlowSanitizer/arith.ll
Index: llvm/trunk/test/Instrumentation/DataFlowSanitizer/arith.ll
===================================================================
--- llvm/trunk/test/Instrumentation/DataFlowSanitizer/arith.ll
+++ llvm/trunk/test/Instrumentation/DataFlowSanitizer/arith.ll
@@ -62,3 +62,13 @@
%c = udiv i8 %a, %b
ret i8 %c
}
+
+define double @fneg(double %a) {
+ ; CHECK: @"dfs$fneg"
+ ; CHECK: load{{.*}}__dfsan_arg_tls
+ ; CHECK: fneg double
+ ; CHECK: store{{.*}}__dfsan_retval_tls
+ ; CHECK: ret double
+ %c = fneg double %a
+ ret double %c
+}
Index: llvm/trunk/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
===================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
+++ llvm/trunk/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
@@ -437,6 +437,7 @@
}
void visitOperandShadowInst(Instruction &I);
+ void visitUnaryOperator(UnaryOperator &UO);
void visitBinaryOperator(BinaryOperator &BO);
void visitCastInst(CastInst &CI);
void visitCmpInst(CmpInst &CI);
@@ -1398,6 +1399,10 @@
DFSF.storeShadow(SI.getPointerOperand(), Size, Align, Shadow, &SI);
}
+void DFSanVisitor::visitUnaryOperator(UnaryOperator &UO) {
+ visitOperandShadowInst(UO);
+}
+
void DFSanVisitor::visitBinaryOperator(BinaryOperator &BO) {
visitOperandShadowInst(BO);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62815.205596.patch
Type: text/x-patch
Size: 1357 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190619/24503b30/attachment.bin>
More information about the llvm-commits
mailing list