[PATCH] D82680: MSAN: Allow emitting checks for struct types

Evgenii Stepanov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 22 13:35:27 PDT 2020


eugenis accepted this revision.
eugenis added a comment.
This revision is now accepted and ready to land.

LGTM with 2 comments



================
Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:1414
   /// Convert a shadow value to it's flattened variant.
-  Value *convertToShadowTyNoVec(Value *V, IRBuilder<> &IRB) {
+  Value *convertShadowToScalar(Value *V, IRBuilder<> &IRB) {
+    if (StructType *Struct = dyn_cast<StructType>(V->getType())) {
----------------
Mention that the result may not be the same bit width as the original type in the comment (this is the usual property of shadow types).



================
Comment at: llvm/test/Instrumentation/MemorySanitizer/check-struct.ll:19
+; CHECK-NOT: icmp ne i1 {{.*}}, false
+; CHECK: br i1 %
+; CHECK: call void @__msan_warning
----------------
could this line say
```; CHECK: br i1 [[F1_OR]]```
?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82680/new/

https://reviews.llvm.org/D82680





More information about the llvm-commits mailing list