Guards: Include ConditionalExpr in exprHasValue.

This commit is contained in:
Anders Schack-Mulligen
2025-09-10 11:22:35 +02:00
parent e8f1ec68db
commit 2743fc0be1

View File

@@ -773,6 +773,10 @@ module Make<
or
exprHasValue(e.(IdExpr).getEqualChildExpr(), v)
or
exists(ConditionalExpr cond | cond = e |
exprHasValue(cond.getThen(), v) and exprHasValue(cond.getElse(), v)
)
or
exists(SsaDefinition def, Guard g, GuardValue gv |
e = def.getARead() and
g.directlyValueControls(e.getBasicBlock(), gv) and