Skip to content

Commit a3e8e86

Browse files
committed
[LVI] Don't push both sides of and/or at once
Same as the change in d5db2cd, but for condition handling. The same issue could occur here as well.
1 parent d5db2cd commit a3e8e86

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

llvm/lib/Analysis/LazyValueInfo.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -1283,9 +1283,11 @@ LazyValueInfoImpl::getValueFromCondition(Value *Val, Value *Cond,
12831283

12841284
std::optional<ValueLatticeElement> LV =
12851285
getValueFromCondition(Val, L, IsTrueDest, UseBlockValue, Depth);
1286+
if (!LV)
1287+
return std::nullopt;
12861288
std::optional<ValueLatticeElement> RV =
12871289
getValueFromCondition(Val, R, IsTrueDest, UseBlockValue, Depth);
1288-
if (!LV || !RV)
1290+
if (!RV)
12891291
return std::nullopt;
12901292

12911293
// if (L && R) -> intersect L and R

0 commit comments

Comments
 (0)