Proof:
https://alive2.llvm.org/ce/z/ss2zyt - rotl
https://alive2.llvm.org/ce/z/ZM7Aue - rotr
Details
- Reviewers
nikic - Commits
- rGde3fa35cdb6f: [InstCombine] ctpop(rot(X)) -> ctpop(X)
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
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 :)
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. :/
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.