Page MenuHomePhabricator

[InstCombine] collectBitParts - add fshl/fshr handling

Authored by RKSimon on Fri, Sep 25, 4:50 AM.



Pulled from D87452, this is a fixed version of the collectBitParts fshl/fshr handling which as @nikic noticed wasn't checking for different providers or had correct bit ordering (which was hid by only testing shift amounts of bitwidth/2).

Diff Detail

Event Timeline

RKSimon created this revision.Fri, Sep 25, 4:50 AM
Herald added a project: Restricted Project. · View Herald TranscriptFri, Sep 25, 4:50 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
nikic accepted this revision.Fri, Sep 25, 11:45 AM

This LGTM now, thanks!


I would if (auto *II = dyn_cast<IntrinsicInst>(I)) and then II->getInrinsicID() here. Doesn't seem necessary to explicitly go through the Function.


modulo -> modulo the bitwidth?

This revision is now accepted and ready to land.Fri, Sep 25, 11:45 AM
This revision was automatically updated to reflect the committed changes.