-
Notifications
You must be signed in to change notification settings - Fork 11.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fatal error: error in backend: Cannot select: intrinsic %llvm.arm.crc32b #57802
Comments
@llvm/issue-subscribers-backend-arm |
I just reproduced this with clang-14 for armv7-unknown-linux-gnueabihf, so can you please consider to backport the fix to all supported branches? |
@stefson: Only 15 is supported. |
if llvm-15 is all supported branches, I take it (: |
This clang crash (SelectionDAG fails to select an instruction) usually doesn't matter because users are supposed to include |
Good stuff. We should reopen this to make sure the AArch64 equivalent happens too, it should be a very similar patch. |
@llvm/issue-subscribers-backend-aarch64 |
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 llvm/llvm-project#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
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 llvm/llvm-project#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
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 llvm/llvm-project#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 8792c03)
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 llvm/llvm-project#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 8792c03)
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 llvm/llvm-project#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)
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 llvm/llvm-project#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
`__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 llvm/llvm-project#57802 Differential Revision: https://reviews.llvm.org/D134127
llvm 16.0.0 from FreeBSD`s llvm-devel-16.0.d20220906 package
FreeBSD 13.1-RELEASE
armv7
Run:
7zCrc-50d52a.c
:Output:
fatal error: error in backend: Cannot select: intrinsic %llvm.arm.crc32b
The text was updated successfully, but these errors were encountered: