[PATCH] D94433: [ValueTracking] Check that alignment is non-zero in computeKnownBitsFromAssume (PR48713).

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 11 11:57:21 PST 2021


jdoerfert added a comment.

No doubt there is a problem here somewhere, not sure if this is the best fix though or just hides it one level deeper.

I wonder if `align(0)` in the input is not already broken.
I'm trying to see if the Clang ppl are interested in changing the behavior that I think is at fault here: https://godbolt.org/z/jo4fx7
When we warn, we should not create the alignment assumption because in IR things depend on the fact that it is a power of two.

If we modify clang we should teach the verifier about the test case above and introduce an assertion `isPowerOfTwo(RK.ArgValue)`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94433/new/

https://reviews.llvm.org/D94433



More information about the llvm-commits mailing list