Skip to content

Commit 3aaf7de

Browse files
committed
Simplify assertions
1 parent 0930461 commit 3aaf7de

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2624,10 +2624,8 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
26242624

26252625
FixedVectorType *ParamType =
26262626
cast<FixedVectorType>(I.getArgOperand(0)->getType());
2627-
if (I.arg_size() == 2) {
2628-
assert(I.getArgOperand(1)->getType()->isVectorTy());
2629-
assert(ParamType == cast<FixedVectorType>(I.getArgOperand(1)->getType()));
2630-
}
2627+
if (I.arg_size() == 2)
2628+
assert(I.getArgOperand(0)->getType() == I.getArgOperand(1)->getType());
26312629

26322630
[[maybe_unused]] FixedVectorType *ReturnType =
26332631
cast<FixedVectorType>(I.getType());
@@ -2676,10 +2674,6 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
26762674
if (ReinterpretShadowTy)
26772675
SecondArgShadow =
26782676
IRB.CreateBitCast(SecondArgShadow, ReinterpretShadowTy);
2679-
assert((cast<FixedVectorType>(SecondArgShadow->getType())
2680-
->getNumElements()) %
2681-
2 ==
2682-
0);
26832677

26842678
EvenShadow =
26852679
IRB.CreateShuffleVector(FirstArgShadow, SecondArgShadow, EvenMask);

0 commit comments

Comments
 (0)