[PATCH] D94433: Do not emit non-power-of-2 alignment assume bundles (PR48713).
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 6 12:19:07 PDT 2021
lebedev.ri 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;
+ }
----------------
rmansfield wrote:
> 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?
Just remove `AA = nullptr; // We're done. Disallow doing anything else.` here and you'll see
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94433/new/
https://reviews.llvm.org/D94433
More information about the llvm-commits
mailing list