Skip to content

Commit 57e8eae

Browse files
committed
Here's my shadow, so shrink it maybe
1 parent 4a11f83 commit 57e8eae

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3395,7 +3395,7 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
33953395
/// This function will return a vector type with the same number of elements
33963396
/// as the input, but same per-element width as the return value e.g.,
33973397
/// <8 x i8>.
3398-
FixedVectorType *shrinkVectorShadowType(Value *Src, IntrinsicInst &I) {
3398+
FixedVectorType *maybeShrinkVectorShadowType(Value *Src, IntrinsicInst &I) {
33993399
assert(isa<FixedVectorType>(getShadowTy(&I)));
34003400
FixedVectorType *ShadowType = cast<FixedVectorType>(getShadowTy(&I));
34013401

@@ -3413,7 +3413,7 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
34133413
/// Doubles the length of a vector shadow (filled with zeros) if necessary to
34143414
/// match the length of the shadow for the instruction.
34153415
/// This is more type-safe than CreateShadowCast().
3416-
Value *extendVectorShadowWithZeros(Value *Shadow, IntrinsicInst &I) {
3416+
Value *maybeExtendVectorShadowWithZeros(Value *Shadow, IntrinsicInst &I) {
34173417
IRBuilder<> IRB(&I);
34183418
assert(isa<FixedVectorType>(Shadow->getType()));
34193419
assert(isa<FixedVectorType>(I.getType()));
@@ -3470,7 +3470,7 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
34703470

34713471
// The return type might have more elements than the input.
34723472
// Temporarily shrink the return type's number of elements.
3473-
VectorType *ShadowType = shrinkVectorShadowType(Src, I);
3473+
VectorType *ShadowType = maybeShrinkVectorShadowType(Src, I);
34743474

34753475
IRBuilder<> IRB(&I);
34763476
Value *S0 = getShadow(&I, 0);
@@ -3485,7 +3485,7 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
34853485

34863486
// The return type might have more elements than the input.
34873487
// Extend the return type back to its original width if necessary.
3488-
Value *FullShadow = extendVectorShadowWithZeros(Shadow, I);
3488+
Value *FullShadow = maybeExtendVectorShadowWithZeros(Shadow, I);
34893489

34903490
setShadow(&I, FullShadow);
34913491
setOriginForNaryOp(I);

0 commit comments

Comments
 (0)