Skip to content

Commit 56c0267

Browse files
committed
Address reviewer comments and rebase
1 parent 3842387 commit 56c0267

File tree

2 files changed

+58
-168
lines changed

2 files changed

+58
-168
lines changed

llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2997,8 +2997,9 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
29972997
/// fine).
29982998
///
29992999
/// Caller guarantees that this intrinsic does not access memory.
3000-
bool maybeHandleSimpleNomemIntrinsic(IntrinsicInst &I,
3001-
unsigned int trailingFlags) {
3000+
[[maybe_unused]] bool
3001+
maybeHandleSimpleNomemIntrinsic(IntrinsicInst &I,
3002+
unsigned int trailingFlags) {
30023003
Type *RetTy = I.getType();
30033004
if (!(RetTy->isIntOrIntVectorTy() || RetTy->isFPOrFPVectorTy()))
30043005
return false;
@@ -3049,7 +3050,7 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
30493050
}
30503051

30513052
if (I.doesNotAccessMemory())
3052-
if (maybeHandleSimpleNomemIntrinsic(I, /* trailingFlags */ 0))
3053+
if (maybeHandleSimpleNomemIntrinsic(I, /*trailingFlags=*/0))
30533054
return true;
30543055

30553056
// FIXME: detect and handle SSE maskstore/maskload?
@@ -4621,6 +4622,8 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
46214622
case Intrinsic::x86_avx2_maskload_d_256:
46224623
case Intrinsic::x86_avx2_maskload_q_256: {
46234624
handleAVXMaskedLoad(I);
4625+
break;
4626+
}
46244627

46254628
// Packed
46264629
case Intrinsic::x86_avx512_min_ps_512:
@@ -4630,9 +4633,8 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
46304633
// These AVX512 variants contain the rounding mode as a trailing flag.
46314634
// Earlier variants do not have a trailing flag and are already handled
46324635
// by maybeHandleSimpleNomemIntrinsic(I, 0) via handleUnknownIntrinsic.
4633-
bool success = maybeHandleSimpleNomemIntrinsic(I, /* trailingFlags */ 1);
4634-
(void)success;
4635-
assert(success);
4636+
bool Success = maybeHandleSimpleNomemIntrinsic(I, /*trailingFlags=*/1);
4637+
assert(Success);
46364638
break;
46374639
}
46384640

0 commit comments

Comments
 (0)