freebsd-dev/contrib/llvm-project
Dimitry Andric 8792c03886 Apply clang fixes for crashes compiling ARM/AArch64 CRC intrinsics
Merge commit 069ecd0c6e2c from llvm-project (by Fangrui Song):

  [ARM] Check target feature support for __builtin_arm_crc*

  `__builtin_arm_crc*` requires the target feature crc which is available on armv8
  and above. Calling the fuctions for armv7 leads to a SelectionDAG crash.

  ```
  % clang -c --target=armv7-unknown-linux-gnueabi -c a.c
  fatal error: error in backend: Cannot select: intrinsic %llvm.arm.crc32b
  PLEASE submit a bug report to ...
  ```

  Add `TARGET_BUILTIN` and define required features for these builtins to
  report an error in `CodeGenFunction::checkTargetFeatures`. The problem is quite widespread.
  I will add `TARGET_BUILTIN` for more builtins later.

  Fix https://github.com/llvm/llvm-project/issues/57802

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

Merge commit b2d7a0dcf1ff from llvm-project (by Fangrui Song):

  [AArch64] Check target feature support for __builtin_arm_crc*

  This is the AArch64 counterpart of D134127.
  Daniel Kiss will change more `BUILTIN` to `TARGET_BUILTIN`.

  Fix #57802

Note that programs attempting to use ARM/AArch64 CRC intrinsics, when
they are not supported by the targeted CPU, will still receive a regular
compilation error (instead of a fatal backend error) similar to:

  7zCrc.c:4:10: error: '__builtin_arm_crc32b' needs target feature crc
    return __builtin_arm_crc32b(a, b);
           ^

Reported by:	Alastair Hogge <agh@riseup.net>
PR:		271624
MFC after:	3 days
2023-05-29 16:28:18 +02:00
..
clang Apply clang fixes for crashes compiling ARM/AArch64 CRC intrinsics 2023-05-29 16:28:18 +02:00
compiler-rt Merge llvm-project release/15.x llvmorg-15.0.6-0-g088f33605d8a 2023-02-08 20:05:19 +01:00
libcxx Apply libc++ fix for compiling <type_traits> with clang 16 2023-05-27 18:19:37 +02:00
libunwind Merge llvm-project main llvmorg-15-init-17485-ga3e38b4a206b 2023-02-08 20:04:38 +01:00
lld Merge llvm-project release/15.x llvmorg-15.0.6-0-g088f33605d8a 2023-02-08 20:05:19 +01:00
lldb lldb: dereference stoppcbs based on target kernel version 2023-05-25 21:45:52 -04:00
llvm llvm/lld: damage control threading 2023-04-03 16:05:42 +00:00
openmp Merge llvm-project release/15.x llvmorg-15.0.0-rc2-40-gfbd2950d8d0d 2023-02-08 20:04:56 +01:00
FREEBSD-Xlist Merge llvm-project main llvmorg-15-init-15358-g53dc0f10787 2023-02-08 20:02:26 +01:00