Fix tautological predicate in V3DfgPeephole

Fixes #3771
This commit is contained in:
Geza Lore 2022-11-22 13:48:49 +00:00
parent 57975c82b7
commit 508e937164
1 changed files with 1 additions and 2 deletions

View File

@ -1509,8 +1509,7 @@ class V3DfgPeephole final : public DfgVisitor {
if (DfgNot* const thenNotp = thenp->cast<DfgNot>()) {
if (DfgNot* const elseNotp = elsep->cast<DfgNot>()) {
if (!thenNotp->srcp()->is<DfgConst>() && !elseNotp->srcp()->is<DfgConst>()
&& (!thenp->hasMultipleSinks() || thenNotp->hasMultipleSinks())
&& (!elsep->hasMultipleSinks() || elsep->hasMultipleSinks())) {
&& !thenNotp->hasMultipleSinks() && !elseNotp->hasMultipleSinks()) {
APPLYING(PULL_NOTS_THROUGH_COND) {
DfgNot* const replacementp
= make<DfgNot>(thenp->fileline(), vtxp->dtypep());