Skip to content

Commit 983bf65

Browse files
authored
[NFC][msan] Extract handleSelectLikeInst (#94881)
`blendv` instructions are very similar to `select`. We will add support for them in followup patches.
1 parent 4f41698 commit 983bf65

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4481,12 +4481,17 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
44814481
}
44824482

44834483
void visitSelectInst(SelectInst &I) {
4484-
IRBuilder<> IRB(&I);
44854484
// a = select b, c, d
44864485
Value *B = I.getCondition();
44874486
Value *C = I.getTrueValue();
44884487
Value *D = I.getFalseValue();
44894488

4489+
handleSelectLikeInst(I, B, C, D);
4490+
}
4491+
4492+
void handleSelectLikeInst(Instruction &I, Value *B, Value *C, Value *D) {
4493+
IRBuilder<> IRB(&I);
4494+
44904495
Value *Sb = getShadow(B);
44914496
Value *Sc = getShadow(C);
44924497
Value *Sd = getShadow(D);

0 commit comments

Comments
 (0)