Skip to content

Commit 09e88e6

Browse files
committed
Save money on parenthesis licensing fees
1 parent 97bfb34 commit 09e88e6

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2101,13 +2101,12 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
21012101
// Check for partially-undefined constant vectors
21022102
// TODO: scalable vectors (this is hard because we do not have IRBuilder)
21032103
if (isa<FixedVectorType>(V->getType()) && isa<Constant>(V) &&
2104-
(cast<Constant>(V))->containsUndefOrPoisonElement() &&
2105-
PropagateShadow && PoisonUndefVectors) {
2106-
unsigned NumElems =
2107-
(cast<FixedVectorType>(V->getType()))->getNumElements();
2104+
cast<Constant>(V)->containsUndefOrPoisonElement() && PropagateShadow &&
2105+
PoisonUndefVectors) {
2106+
unsigned NumElems = cast<FixedVectorType>(V->getType())->getNumElements();
21082107
SmallVector<Constant *, 32> ShadowVector(NumElems);
21092108
for (unsigned i = 0; i != NumElems; ++i) {
2110-
Constant *Elem = (cast<Constant>(V))->getAggregateElement(i);
2109+
Constant *Elem = cast<Constant>(V)->getAggregateElement(i);
21112110
ShadowVector[i] = isa<UndefValue>(Elem) ? getPoisonedShadow(Elem)
21122111
: getCleanShadow(Elem);
21132112
}

0 commit comments

Comments
 (0)