[PATCH] D68236: Handle llvm.launder.invariant.group in msan.
Evgenii Stepanov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 1 13:10:16 PDT 2019
eugenis accepted this revision.
eugenis added a comment.
This revision is now accepted and ready to land.
LGTM with one more test
================
Comment at: llvm/test/Instrumentation/MemorySanitizer/msan_llvm_launder_invariant.ll:26
+ ret %class.Foo* %retval.0
+}
+
----------------
TokarIP wrote:
> eugenis wrote:
> > The test could be a lot simpler, something like
> >
> > i8* f(i8 *p) {
> > return @llvm.launder.invariant.group(p);
> > }
> >
> This is just a n IR from minimal reproducer for false-positive, so I wanted to keep it as a regression test.
> I've tried your test case, but it generates same IR with and without this patch.
This does not sound right. Before this patch there should be a shadow check for the intrinsic argument, after the patch - only this:
%0 = load i64, i64* getelementptr inbounds ([100 x i64], [100 x i64]* @__msan_param_tls, i32 0, i32 0), align 8
%q = call i8* @llvm.launder.invariant.group.p0i8(i8* %p)
store i64 %0, i64* getelementptr inbounds ([100 x i64], [100 x i64]* @__msan_retval_tls, i32 0, i32 0), align 8
ret i8* %q
Sure, let's keep this test, it gives extra context about the problem, but please add a minimal one for llvm.strip.invariant.group.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68236/new/
https://reviews.llvm.org/D68236
More information about the llvm-commits
mailing list