[Bug 271624] emulators/qmc2: clang crashes during build on {12.4,13.1}-arm64-quarterly
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 01 Jun 2023 19:17:08 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271624 --- Comment #7 from commit-hook@FreeBSD.org --- A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3cc4f10db0feca9d54bbfc615328b317a5c6b4c8 commit 3cc4f10db0feca9d54bbfc615328b317a5c6b4c8 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2023-05-29 14:27:58 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2023-06-01 19:15:31 +0000 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 (cherry picked from commit 8792c03886d9e6df10fbac825819603dc059c7ea) .../clang/include/clang/Basic/BuiltinsAArch64.def | 20 ++++++++++++-------- .../clang/include/clang/Basic/BuiltinsARM.def | 20 ++++++++++++-------- .../llvm-project/clang/lib/Basic/Targets/AArch64.cpp | 2 ++ contrib/llvm-project/clang/lib/Basic/Targets/ARM.cpp | 2 ++ 4 files changed, 28 insertions(+), 16 deletions(-) -- You are receiving this mail because: You are on the CC list for the bug.