This is an archive of the discontinued LLVM Phabricator instance.

[DAGCombiner] Simplify code around call to reduceLoadWidth in visitAND. NFC
ClosedPublic

Authored by craig.topper on Jul 21 2022, 11:47 PM.

Details

Summary

We were looking for loads or any_extend+load. reduceLoadWidth
hasn't known how to look through such an any_extend to find the
load since D40667 almost 5 years ago.

Diff Detail

Event Timeline

craig.topper created this revision.Jul 21 2022, 11:47 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 21 2022, 11:47 PM
craig.topper requested review of this revision.Jul 21 2022, 11:47 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 21 2022, 11:47 PM

Remove stale comment

RKSimon accepted this revision.Jul 22 2022, 2:56 AM

LGTM

llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
6366–6368

We can probably move the !VT.isVector() to the end to make the if() evaluation much cheaper to early-out

This revision is now accepted and ready to land.Jul 22 2022, 2:56 AM
This revision was landed with ongoing or failed builds.Jul 22 2022, 8:37 AM
This revision was automatically updated to reflect the committed changes.