Skip to content

InstCombiner::SimplifyDemandedBit can modify an instruction without adding it to the worklist #20359

@llvmbot

Description

@llvmbot
Bugzilla Link 19985
Version trunk
OS Linux
Reporter LLVM Bugzilla Contributor
CC @d0k

Extended Description

bool InstCombiner::SimplifyDemandedBits(Use &U, APInt DemandedMask,
APInt &KnownZero, APInt &KnownOne,
unsigned Depth) {
Value *NewVal = SimplifyDemandedUseBits(U.get(), DemandedMask,
KnownZero, KnownOne, Depth);
if (!NewVal) return false;
U = NewVal;
return true;
}

The use is modified, but the instructions in not added back to the worklist.

I don't have a testcase where this changes the result. I just noticed an instruction being modified and not immediately being revisited while looking at another issuer in a debugger.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillallvm:instcombineCovers the InstCombine, InstSimplify and AggressiveInstCombine passes

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions