freebsd-dev/contrib/llvm-project
Dimitry Andric fc7efa1b6a Merge commit f75939599 from llvm git (by Erich Keane):
Reland r374450 with Richard Smith's comments and test fixed.

  The behavior from the original patch has changed, since we're no
  longer allowing LLVM to just ignore the alignment.  Instead, we're
  just assuming the maximum possible alignment.

  Differential Revision: https://reviews.llvm.org/D68824

  llvm-svn: 374562

This fixes 'Assertion failed: (Alignment != 0 && "Invalid Alignment"),
function CreateAlignmentAssumption', when building recent versions of
v8, which invoke __builtin_assume_aligned() with its alignment argument
set to 4GiB or more.

Clang will now report a warning, and show the maximum possible alignment
instead, e.g.:

huge-align.cpp:1:27: warning: requested alignment must be 536870912 bytes or smaller; maximum alignment assumed [-Wbuiltin-assume-aligned-alignment]
void *f(void *g) { return __builtin_assume_aligned(g, 4294967296); }
                          ^                           ~~~~~~~~~~

Upstream PR:	https://bugs.llvm.org/show_bug.cgi?id=43839
Reported by:	cem
MFC after:	3 days
2020-03-06 17:02:14 +00:00
..
clang Merge commit f75939599 from llvm git (by Erich Keane): 2020-03-06 17:02:14 +00:00
compiler-rt [PowerPC] enable atomic.c in compiler_rt and do not check and forces 2019-12-26 23:06:28 +00:00
libcxx Merge commit f97936fab from llvm git (by Eric Fiselier): 2019-12-22 11:58:44 +00:00
libunwind revert r356513: libunwind: untested attempt to fix sparc64 build 2020-01-09 14:10:11 +00:00
lld Merge commit 189b7393d from llvm git (by John Baldwin): 2020-01-03 20:29:54 +00:00
lldb Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp 2019-12-22 11:50:44 +00:00
llvm Merge commit 7214f7a79 from llvm git (by Sam Elliott): 2020-02-27 20:08:46 +00:00
openmp Consolidate FREEBSD-Xlist files of different llvm sub-projects into one. 2019-12-20 21:42:10 +00:00
FREEBSD-Xlist Consolidate FREEBSD-Xlist files of different llvm sub-projects into one. 2019-12-20 21:42:10 +00:00