This is an archive of the discontinued LLVM Phabricator instance.

[builtins] Inline __paritysi2 into __paritydi2 and inline __paritydi2 into __parityti2.
ClosedPublic

Authored by craig.topper on Sep 6 2020, 8:00 PM.

Details

Summary

No point in making parityti2 go through 2 calls to get to
paritysi2.

Diff Detail

Event Timeline

craig.topper created this revision.Sep 6 2020, 8:00 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 6 2020, 8:00 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript
craig.topper requested review of this revision.Sep 6 2020, 8:00 PM
MaskRay added a comment.EditedSep 7 2020, 4:19 PM

I think this is correct, but does their performance matter? llvm/IR/RuntimeLibcalls.def does not define them (they cannot be produced by llvm). Targets either emit popcount & 1 or detect the idiom and emit an optimized parity (x86 after PR46954)

I think this is correct, but does their performance matter? llvm/IR/RuntimeLibcalls.def does not define them (they cannot be produced by llvm). Targets either emit popcount & 1 or detect the idiom and emit an optimized parity (x86 after PR46954)

Performance probably doesn't matter. Just one of the things a certain someone wasn't amused by.

MaskRay accepted this revision.Sep 7 2020, 4:56 PM

LG. Please wait a bit for @efriedma's comments.

This revision is now accepted and ready to land.Sep 7 2020, 4:56 PM
efriedma accepted this revision.Sep 7 2020, 5:03 PM

LGTM