[PATCH] D71499: Add builtins for aligning and checking alignment of pointers and integers

Roman Lebedev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 3 07:25:56 PST 2020


lebedev.ri added a comment.

In D71499#1802134 <https://reviews.llvm.org/D71499#1802134>, @lebedev.ri wrote:

> For future reference, if anyone needs here's the C versions of these builtins:
>  https://godbolt.org/z/oHeAh-
>
> ^ looks like we are missing some backend-level folds for round-down variant, filed https://bugs.llvm.org/show_bug.cgi?id=44448


Appled some backend codegen fixes (8dab0a4a7d691f2704f1079538e0ef29548db159 <https://reviews.llvm.org/rG8dab0a4a7d691f2704f1079538e0ef29548db159>, 3d492d7503d197246115eb38e7b1b61143d0c99f <https://reviews.llvm.org/rG3d492d7503d197246115eb38e7b1b61143d0c99f>, 0727e2b90c7b11d5c6be55919c443628d8e2bc6e <https://reviews.llvm.org/rG0727e2b90c7b11d5c6be55919c443628d8e2bc6e>),
`__builtin_align_down()` codegen should now be as optimal as `__builtin_align_up()` is. (at least on X86)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71499





More information about the cfe-commits mailing list