This is an archive of the discontinued LLVM Phabricator instance.

[WIP][SDag] Allow targets to simplify generic nodes using demanded bits info
Needs ReviewPublic

Authored by foad on Oct 22 2020, 7:35 AM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None

Diff Detail

Event Timeline

foad created this revision.Oct 22 2020, 7:35 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 22 2020, 7:35 AM
foad requested review of this revision.Oct 22 2020, 7:35 AM

Much like with a similar InstCombine question, i'm on the edge about this.

llvm/lib/Target/X86/X86ISelLowering.cpp
34052–34066

I think you want to instead add a computeKnownBitsUsingTargetKnowledge()

An alternative I thought of is to add a target hook to ShrinkDemandedOp similar to the one we have in ShrinkDemandedConstant. Or might be able to just make ShrinkDemandedOp virtual?