This is an archive of the discontinued LLVM Phabricator instance.

[KnownBits] Add knownbits analysis for mulhs/mulu 'multiply high' instructions
ClosedPublic

Authored by RKSimon on Mar 18 2021, 7:14 AM.

Details

Summary

Split off from D98857

Diff Detail

Event Timeline

RKSimon created this revision.Mar 18 2021, 7:14 AM
RKSimon requested review of this revision.Mar 18 2021, 7:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 18 2021, 7:14 AM
RKSimon updated this revision to Diff 331602.Mar 18 2021, 10:03 AM
RKSimon added a subscriber: foad.

Fix typo in comment noticed by @foad on D98857

foad accepted this revision.Mar 18 2021, 10:11 AM

LGTM.

This revision is now accepted and ready to land.Mar 18 2021, 10:11 AM
nikic added inline comments.Mar 18 2021, 10:20 AM
llvm/lib/Support/KnownBits.cpp
498

Side note, we should rename computeForMul -> mul.

foad added inline comments.Mar 18 2021, 10:23 AM
llvm/lib/Support/KnownBits.cpp
498

I would vote for operator*.

lebedev.ri accepted this revision.Mar 18 2021, 10:33 AM

LG, thank you.

Cheers - there's a sort of convergence going on that KnownBits function names match APInt (although APInt doesn't have any mulh methods) - not sure about operators though. I've been burnt in the past with the & operator as I thought it would be to determine common bits......

nagisa added a subscriber: nagisa.Mar 18 2021, 4:25 PM