[PATCH] D143813: [ClangFE] Check that __sync builtins are naturally aligned.

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 11 09:56:57 PDT 2023


efriedma added a comment.

I think the issue is that you're calling EmitPointerWithAlignment() on the argument, then calling EmitScalarExpr on the same argument.  Essentially, emitting the argument twice.  If emitting the argument has side-effects, that will cause an issue.  Sorry, should have spotted that while reviewing. Should be straightforward to fix, though; just make CheckAtomicAlignment return the computed pointer.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D143813



More information about the cfe-commits mailing list