This is an archive of the discontinued LLVM Phabricator instance.

[ValueTracking] Check likely to be canonicalized constant operands first in ; NFC
ClosedPublic

Authored by goldstein.w.n on Aug 7 2023, 10:55 AM.

Details

Summary

Checking operands that a likely to be canonicalized constants first makes sense
from a compile time perspective as it puts whats expected to be a cheaper check first.

Diff Detail

Event Timeline

goldstein.w.n created this revision.Aug 7 2023, 10:55 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 7 2023, 10:55 AM
goldstein.w.n requested review of this revision.Aug 7 2023, 10:55 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 7 2023, 10:55 AM
nikic added inline comments.Aug 7 2023, 11:41 AM
llvm/lib/Analysis/ValueTracking.cpp
2109

Does this canonicalization actually exist?

goldstein.w.n added inline comments.Aug 7 2023, 11:47 AM
llvm/lib/Analysis/ValueTracking.cpp
2109

No. Happy to drop but think its not difference either way.

nikic accepted this revision.Aug 7 2023, 11:51 AM

LGTM

This revision is now accepted and ready to land.Aug 7 2023, 11:51 AM
goldstein.w.n retitled this revision from [ValueTracking] Check likely to be canonicalized constant operands first in ; NFC to [ValueTracking] Check likely to be canonicalized constant operands first in `isKnownToBeAPowerOfTwo`; NFC.Aug 7 2023, 11:52 AM
goldstein.w.n retitled this revision from [ValueTracking] Check likely to be canonicalized constant operands first in `isKnownToBeAPowerOfTwo`; NFC to [ValueTracking] Check likely to be canonicalized constant operands first in ; NFC.

Drop changes to select

llvm/lib/Analysis/ValueTracking.cpp
2109

I dropped the select changes.

Rebase before isKnownNonZero patch

This revision was landed with ongoing or failed builds.Aug 9 2023, 12:46 PM
This revision was automatically updated to reflect the committed changes.