This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine] ctpop(rot(X)) -> ctpop(X)
ClosedPublic

Authored by xbolva00 on Apr 24 2021, 9:14 AM.

Diff Detail

Event Timeline

xbolva00 created this revision.Apr 24 2021, 9:14 AM
xbolva00 requested review of this revision.Apr 24 2021, 9:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 24 2021, 9:14 AM
nikic accepted this revision.Apr 24 2021, 9:19 AM

LGTM

This revision is now accepted and ready to land.Apr 24 2021, 9:19 AM
This revision was landed with ongoing or failed builds.Apr 24 2021, 9:25 AM
This revision was automatically updated to reflect the committed changes.

@nikic please don't blindly stamp @xbolva00 reviews.
The QC on those is the same as it ever was.

xbolva00 added a comment.EditedApr 24 2021, 11:01 AM

@nikic please don't blindly stamp @xbolva00 reviews.
The QC on those is the same as it ever was.

I fixed UB, sorry. Arent buildbots designed to find issues? Ok, fine. Fixed. I dont build llvm with msan. Great to know you never do mistakes :)

@nikic please don't blindly stamp @xbolva00 reviews.
The QC on those is the same as it ever was.

I fixed UB, sorry. Fixed. I dont build llvm with msan. Great to know you never do mistakes :)

It's a sign of lack of most basic negative test.

I'm just really surprised to *still* see such basic teething problems
after so many years of patches to this area of codebase,
so i'm not really sure how to even suggest to please pay just a bit more attention. :/

xbolva00 added a comment.EditedApr 24 2021, 11:24 AM

Well, ctpop_add_no_common_bits contains ctpop( fshl(a, b, 16) ) so A != B path was triggered and still it was ok on my PC and some bots too.

lebedev.ri added a comment.EditedApr 24 2021, 2:17 PM

Well, ctpop_add_no_common_bits contains ctpop( fshl(a, b, 16) ) so A != B path was triggered and still it was ok on my PC and some bots too.

I can't comment on whether or not it reproduces on your machine.
Can you link the bot that run that did run that test and didn't fail?
I would suggest to analyze why that is and change things so that it does reproduce for you.

Thankfully @nikic improved documentation for m_Deferred to avoid misuse of m_Specific.