[PATCH] D110634: [llvm] Update IR verifier to reject non-power-of-2 alignment assume bundles (PR48713).

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 2 07:57:26 PDT 2021


nikic added a comment.

In D110634#3028264 <https://reviews.llvm.org/D110634#3028264>, @jdoerfert wrote:

> In D110634#3028153 <https://reviews.llvm.org/D110634#3028153>, @lebedev.ri wrote:
>
>> @jdoerfert wasn't the alignment intentionally been left as not being required to be constant?
>
> Yes. Though, I'm not even sure we emit/use non-constant alignments right now. If we emit them we would use them if they are proven to be constant later.
> More elaborate support was eventually planned though. I would not require constants here, I overlooked that earlier.

Well, if we don't require constants here then we can't add this check -- this means that some valid input IR (with non-constant non-power-of-two alignment) could become invalid after folding.

Allowing non-constants here doesn't make a great deal of sense to me, in terms of practical usefulness. My understanding was that these operand bundles are supposed to model the corresponding metadata, and that doesn't allow non-constant values either.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D110634



More information about the llvm-commits mailing list