mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-26 07:24:25 +00:00
[msan] Fix handling of select with vector condition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171069 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1566,9 +1566,18 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
|
||||
setShadow(&I, IRB.CreateSelect(I.getCondition(),
|
||||
getShadow(I.getTrueValue()), getShadow(I.getFalseValue()),
|
||||
"_msprop"));
|
||||
if (MS.TrackOrigins)
|
||||
setOrigin(&I, IRB.CreateSelect(I.getCondition(),
|
||||
if (MS.TrackOrigins) {
|
||||
// Origins are always i32, so any vector conditions must be flattened.
|
||||
// FIXME: consider tracking vector origins for app vectors?
|
||||
Value *Cond = I.getCondition();
|
||||
if (Cond->getType()->isVectorTy()) {
|
||||
Value *ConvertedShadow = convertToShadowTyNoVec(Cond, IRB);
|
||||
Cond = IRB.CreateICmpNE(ConvertedShadow,
|
||||
getCleanShadow(ConvertedShadow), "_mso_select");
|
||||
}
|
||||
setOrigin(&I, IRB.CreateSelect(Cond,
|
||||
getOrigin(I.getTrueValue()), getOrigin(I.getFalseValue())));
|
||||
}
|
||||
}
|
||||
|
||||
void visitLandingPadInst(LandingPadInst &I) {
|
||||
|
Reference in New Issue
Block a user