Currently Load/Store alignment is only set in InstComnine pass based on computeKnownBits function.
computeKnownBits is stateless and recursive, therefore it is limited in how much analysis it can do and it will give up after 6 level or after 1 phi and 1 level.
This cause the alignment information to often be pessimistic. On some target having the right alignment important for performance.
This new pass does a more expensive analysis of KnownBits for all the integer of a function and deduce a more accurate alignment information out of it.
Also starting a discourse discussion about it.
I'd suggest to pre-commit a clang-format of this header.