[PATCH] D54653: [IRBuilder] Remove positivity check from CreateAlignmentAssumption()

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 24 11:37:58 PST 2019


lebedev.ri added a comment.

In D54653#1369828 <https://reviews.llvm.org/D54653#1369828>, @jyknight wrote:

> I'd like to see the rule we ended up with documented somewhere.


Okay, makes sense.
Any better place for that other than the comment before this function?

> That is:
> 
>> When the pointer is non-null, then the alignment must be a positive power of 2 (otherwise UB).
> 
> It's not necessarily obvious that the UBness of invalid alignments ought to be conditional upon the pointer's value.




Repository:
  rL LLVM

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

https://reviews.llvm.org/D54653





More information about the llvm-commits mailing list