Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 May 2023 14:29:30 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 271624] emulators/qmc2: clang crashes during build on (12.4,13.1}-arm64-quarterly
Message-ID:  <bug-271624-7788-cemxwxywcj@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-271624-7788@https.bugs.freebsd.org/bugzilla/>
References:  <bug-271624-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D271624

--- Comment #5 from commit-hook@FreeBSD.org ---
A commit in branch main references this bug:

URL:
https://cgit.FreeBSD.org/src/commit/?id=3D8792c03886d9e6df10fbac825819603dc=
059c7ea

commit 8792c03886d9e6df10fbac825819603dc059c7ea
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2023-05-29 14:27:58 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2023-05-29 14:28:18 +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 availab=
le
on armv8
      and above. Calling the fuctions for armv7 leads to a SelectionDAG cra=
sh.

      ```
      % clang -c --target=3Darmv7-unknown-linux-gnueabi -c a.c
      fatal error: error in backend: Cannot select: intrinsic %llvm.arm.crc=
32b
      PLEASE submit a bug report to ...
      ```

      Add `TARGET_BUILTIN` and define required features for these builtins =
to
      report an error in `CodeGenFunction::checkTargetFeatures`. The proble=
m 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

 .../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(-)

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-271624-7788-cemxwxywcj>