aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp')
-rw-r--r--llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp b/llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp
index 2d1b762..9611342 100644
--- a/llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp
+++ b/llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp
@@ -1981,7 +1981,8 @@ void CHR::addToMergedCondition(bool IsTrueBiased, Value *Cond,
!isGuaranteedNotToBeUndefOrPoison(Cond))
Cond = IRB.CreateFreeze(Cond);
- MergedCondition = IRB.CreateAnd(MergedCondition, Cond);
+ // Use logical and to avoid propagating poison from later conditions.
+ MergedCondition = IRB.CreateLogicalAnd(MergedCondition, Cond);
}
void CHR::transformScopes(SmallVectorImpl<CHRScope *> &CHRScopes) {