[PATCH] D110634: [llvm] Update IR verifier to reject non-power-of-2 alignment assume bundles (PR48713).

Ryan Mansfield via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 28 10:06:53 PDT 2021


rmansfield added a comment.

In D110634#3027788 <https://reviews.llvm.org/D110634#3027788>, @jdoerfert wrote:

> I think this looks good, need to update some tests though.

Thanks for the review. The compiler-rt tests appear to be failing because the clang change not to emit the non-power of two assume bundle doesn't seem to be applied and the tests generate IR that is now being rejected.

e.g.

  /var/lib/buildkite-agent/builds/llvm-project/compiler-rt/test/hwasan/TestCases/Linux/aligned_alloc-alignment.cpp:15:27: warning: requested alignment is not a power of 2 [-Wnon-power-of-two-alignment]
    void *p = aligned_alloc(17, 100);
                            ^~
  alignment must be a power of 2
    call void @llvm.assume(i1 true) [ "align"(i8* %call, i64 17) ], !dbg !19
  in function main
  fatal error: error in backend: Broken function found, compilation aborted!

With both patches applied the tests pass locally. I'm not sure how to link the reviews such the build bots will build with both changes applied.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D110634



More information about the llvm-commits mailing list