[PATCH] D94433: Do not emit non-power-of-2 alignment assume bundles (PR48713).

Ryan Mansfield via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 6 12:18:01 PDT 2021


rmansfield added inline comments.


================
Comment at: clang/lib/CodeGen/CGCall.cpp:4561-4565
+    // Non power-of-2 alignment is UB and rejected by the IR verifier.
+    if (!AlignmentCI->getValue().isPowerOf2()) {
+      AA = nullptr; // We're done. Disallow doing anything else.
       return Attrs;
+    }
----------------
lebedev.ri wrote:
> No, we should emit it as a simple assumption.
Thanks for the feedback. Sorry for misunderstanding, from earlier comments I thought that no llvm.assume should be emitted for non-power-of-2 alignments. Can you elaborate on what you mean by simple assumption should be emitted?


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

https://reviews.llvm.org/D94433



More information about the llvm-commits mailing list